File tree Expand file tree Collapse file tree 3 files changed +21
-34
lines changed Expand file tree Collapse file tree 3 files changed +21
-34
lines changed Original file line number Diff line number Diff line change @@ -15,37 +15,21 @@ repos:
15
15
args : ["--fix=lf"]
16
16
- id : trailing-whitespace
17
17
18
- - repo : https://github.com/pycqa/isort
19
- rev : 5.12.0
20
- hooks :
21
- - id : isort
22
-
23
18
- repo : https://github.com/asottile/pyupgrade
24
19
rev : v3.6.0
25
20
hooks :
26
21
- id : pyupgrade
27
22
args : ["--py37-plus", "--keep-runtime-typing"]
28
23
24
+ - repo : https://github.com/charliermarsh/ruff-pre-commit
25
+ rev : v0.0.272
26
+ hooks :
27
+ - id : ruff
28
+ args : [--fix, --show-fixes]
29
+ exclude : " tests/test_catch_py311.py"
30
+
29
31
- repo : https://github.com/psf/black
30
32
rev : 23.3.0
31
33
hooks :
32
34
- id : black
33
35
exclude : " tests/test_catch_py311.py"
34
-
35
- - repo : https://github.com/csachs/pyproject-flake8
36
- rev : v6.0.0.post1
37
- hooks :
38
- - id : pyproject-flake8
39
- additional_dependencies : [flake8-bugbear]
40
- exclude : " tests/test_catch_py311.py"
41
-
42
- - repo : https://github.com/pre-commit/pygrep-hooks
43
- rev : v1.10.0
44
- hooks :
45
- - id : python-check-blanket-noqa
46
- - id : python-check-blanket-type-ignore
47
- - id : python-no-eval
48
- - id : python-use-type-annotations
49
- - id : rst-backticks
50
- - id : rst-directive-colons
51
- - id : rst-inline-touching-normal
Original file line number Diff line number Diff line change @@ -44,16 +44,19 @@ version_scheme = "post-release"
44
44
local_scheme = " dirty-tag"
45
45
write_to = " src/exceptiongroup/_version.py"
46
46
47
- [tool .black ]
48
- target-version = [' py37' ]
49
-
50
- [tool .isort ]
51
- src_paths = [" src" ]
52
- skip_gitignore = true
53
- profile = " black"
47
+ [tool .ruff ]
48
+ line-length = 88
49
+ select = [
50
+ " E" , " F" , " W" , # default flake-8
51
+ " I" , # isort
52
+ " ISC" , # flake8-implicit-str-concat
53
+ " PGH" , # pygrep-hooks
54
+ " RUF100" , # unused noqa (yesqa)
55
+ ]
56
+ target-version = " py37"
54
57
55
- [tool .flake8 ]
56
- max-line-length = 88
58
+ [tool .ruff . isort ]
59
+ known-first-party = [ " exce
8000
ptiongroup " ]
57
60
58
61
[tool .pytest .ini_options ]
59
62
addopts = " -rsx --tb=short --strict-config --strict-markers"
Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ def test_basics_subgroup_by_predicate__match(self):
290
290
]
291
291
292
292
for match_type , template in testcases :
293
- subeg = eg .subgroup (lambda e : isinstance (e , match_type )) # noqa: B023
293
+ subeg = eg .subgroup (lambda e : isinstance (e , match_type ))
294
294
self .assertEqual (subeg .message , eg .message )
295
295
self .assertMatchesTemplate (subeg , ExceptionGroup , template )
296
296
@@ -355,7 +355,7 @@ def test_basics_split_by_predicate__match(self):
355
355
]
356
356
357
357
for match_type , match_template , rest_template in testcases :
358
- match , rest = eg .split (lambda e : isinstance (e , match_type )) # noqa: B023
358
+ match , rest = eg .split (lambda e : isinstance (e , match_type ))
359
359
self .assertEqual (match .message , eg .message )
360
360
self .assertMatchesTemplate (match , ExceptionGroup , match_template )
361
361
if rest_template is not None :
You can’t perform that action at this time.
0 commit comments