Skip to content

Commit

Permalink
disable mypy, add fixme/noqa statements, adjust zizmor problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Jan 15, 2025
1 parent e9e4157 commit 316437d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
token: ${{ steps.token_generator.outputs.token }}
- name: Set up Python3
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
persist-credentials: false
- name: Setup Conda (Micromamba) with Python${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246 # v2.0.0
with:
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ repos:
rev: v2.13
hooks:
- id: vulture
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.14.1
# hooks:
# - id: mypy
- repo: https://github.com/keewis/blackdoc
rev: v0.3.9
hooks:
Expand All @@ -89,7 +89,7 @@ repos:
additional_dependencies: [ 'pyupgrade==3.17.0' ]
- id: nbqa-black
args: [ '--target-version=py310' ]
additional_dependencies: [ 'black==24.8.0' ]
additional_dependencies: [ 'black==24.10.0' ]
- id: nbqa-isort
additional_dependencies: [ 'isort==5.13.2' ]
- repo: https://github.com/kynan/nbstripout
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ min_confidence = 90
paths = ["src/xscen", "tests"]
sort_by_size = true


# [tool.setuptools.packages.find]
# include = [
# ".zenodo.json",
Expand Down
8 changes: 7 additions & 1 deletion src/xscen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,14 @@
__version__ = "0.10.2-dev.1"


# FIXME: file and line are unused
def warning_on_one_line(
message: str, category: Warning, filename: str, lineno: int, file=None, line=None
message: str,
category: Warning,
filename: str,
lineno: int,
file=None, # noqa: F841
line=None, # noqa: F841
):
"""
Monkeypatch Reformat warning so that `warnings.warn` doesn't mention itself.
Expand Down
3 changes: 2 additions & 1 deletion src/xscen/scripting.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ def timeout(seconds: int, task: str = ""):
yield
else:

def _timeout_handler(signum, frame):
# FIXME: These variables are not used
def _timeout_handler(signum, frame): # noqa: F841
raise TimeoutException(seconds, task)

old_handler = signal.signal(signal.SIGALRM, _timeout_handler)
Expand Down

0 comments on commit 316437d

Please sign in to comment.