Skip to content

Commit 9821725

Browse files
committed
Update pre-commit hooks and fix linting issues
1 parent b73cdf7 commit 9821725

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
pre-commit:
1111
name: Lint
12-
uses: tskit-dev/.github/.github/workflows/lint.yml@v1
12+
uses: tskit-dev/.github/.github/workflows/lint.yml@v2
1313

1414
test:
1515
name: Python

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-merge-conflict
66
- id: debug-statements
@@ -14,13 +14,13 @@ repos:
1414
exclude: dev-tools|examples
1515
verbose: true
1616
- repo: https://github.com/asottile/reorder_python_imports
17-
rev: v3.14.0
17+
rev: v3.15.0
1818
hooks:
1919
- id: reorder-python-imports
2020
args: [--application-directories=python,
2121
--unclassifiable-application-module=_tskit]
2222
- repo: https://github.com/asottile/pyupgrade
23-
rev: v3.19.1
23+
rev: v3.20.0
2424
hooks:
2525
- id: pyupgrade
2626
args: [--py3-plus, --py38-plus]
@@ -30,13 +30,13 @@ repos:
3030
- id: black
3131
language_version: python3
3232
- repo: https://github.com/pycqa/flake8
33-
rev: 7.1.2
33+
rev: 7.3.0
3434
hooks:
3535
- id: flake8
3636
args: [--config=python/.flake8]
3737
additional_dependencies: ["flake8-bugbear==23.9.16", "flake8-builtins==2.1.0"]
3838
- repo: https://github.com/asottile/blacken-docs
39-
rev: 1.19.1
39+
rev: 1.20.0
4040
hooks:
4141
- id: blacken-docs
4242
args: [--skip-errors]

python/tests/test_tree_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def cached_np(func):
5353
cache = {}
5454

5555
def f(*args):
56-
nonlocal cache
56+
nonlocal cache # noqa: F824
5757
key = tuple(x.tobytes() for x in args)
5858
if key not in cache:
5959
cache[key] = func(*args)

0 commit comments

Comments
 (0)