Skip to content

Commit d572b3a

Browse files
Ben Jefferybenjeffery
authored andcommitted
Fix and update pre-commit
1 parent 818364b commit d572b3a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.1.0
3+
rev: v4.4.0
44
hooks:
55
- id: check-merge-conflict
66
- id: debug-statements
77
- id: mixed-line-ending
88
- id: check-case-conflict
99
- id: check-yaml
1010
- repo: https://github.com/benjeffery/pre-commit-clang-format
11-
rev: c21a74d089aaeb86c2c19df371c7e7bf40c07207
11+
rev: '1.0'
1212
hooks:
1313
- id: clang-format
1414
exclude: avl
1515
verbose: true
1616
- repo: https://github.com/asottile/reorder_python_imports
17-
rev: v3.0.1
17+
rev: v3.9.0
1818
hooks:
1919
- id: reorder-python-imports
2020
args: [ --unclassifiable-application-module=_tsinfer ]
2121
- repo: https://github.com/asottile/pyupgrade
22-
rev: v2.31.1
22+
rev: v3.2.2
2323
hooks:
2424
- id: pyupgrade
2525
args: [ --py3-plus, --py37-plus ]
2626
- repo: https://github.com/psf/black
27-
rev: 22.3.0
27+
rev: 22.10.0
2828
hooks:
2929
- id: black
3030
language_version: python3
@@ -35,9 +35,9 @@ repos:
3535
args: [--skip-errors]
3636
additional_dependencies: [black==22.3.0]
3737
language_version: python3
38-
- repo: https://gitlab.com/pycqa/flake8
39-
rev: 3.9.2
38+
- repo: https://github.com/pycqa/flake8
39+
rev: 6.0.0
4040
hooks:
4141
- id: flake8
4242
args: [--config=.flake8]
43-
additional_dependencies: ["flake8-bugbear==22.3.23", "flake8-builtins==1.5.3"]
43+
additional_dependencies: ["flake8-bugbear==22.10.27", "flake8-builtins==2.0.1"]

tests/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def test_infer(self):
403403
)
404404
def test_map(self):
405405
ratemap = os.path.join(self.tempdir.name, "ratemap.txt")
406-
with open(ratemap, "wt") as map:
406+
with open(ratemap, "w") as map:
407407
print("Chromosome Position(bp) Rate(cM/Mb) Map(cM)", file=map)
408408
print("chr1 0 0.1 0", file=map)
409409
print("chr1 1 0.2 0.002", file=map)
@@ -428,7 +428,7 @@ def test_fails_on_bad_map(self):
428428
sd = tsinfer.load(self.sample_file)
429429
last_pos = sd.sites_position[-1]
430430
assert last_pos > 2
431-
with open(ratemap, "wt") as map:
431+
with open(ratemap, "w") as map:
432432
print("Chromosome Position(bp) Rate(cM/Mb) Map(cM)", file=map)
433433
print("chr1 0 0.1 0.0", file=map)
434434
print(f"chr1 {int(last_pos) - 1} 0.2 0.001", file=map)

0 commit comments

Comments
 (0)