File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 13
13
- id : black
14
14
15
15
- repo : https://github.com/PyCQA/autoflake
16
- rev : v2.0.1
16
+ rev : v2.0.2
17
17
hooks :
18
18
- id : autoflake
19
19
34
34
- id : mypy
35
35
36
36
- repo : https://github.com/RobertCraigie/pyright-python
37
- rev : v1.1.298
37
+ rev : v1.1.299
38
38
hooks :
39
39
- id : pyright
40
40
entry : env PYRIGHT_PYTHON_FORCE_VERSION=latest pyright
@@ -109,7 +109,7 @@ repos:
109
109
- id : yamlfmt
110
110
111
111
- repo : https://github.com/macisamuele/language-formatters-pre-commit-hooks
112
- rev : v2.7 .0
112
+ rev : v2.8 .0
113
113
hooks :
114
114
- id : pretty-format-toml
115
115
args : [--autofix]
Original file line number Diff line number Diff line change
1
+ ---
2
+ - id : flake8_trio
3
+ name : flake8_trio
4
+ entry : flake8_trio
5
+ language : python
6
+ types : [python]
Original file line number Diff line number Diff line change @@ -109,13 +109,16 @@ def main():
109
109
all_filenames = [
110
110
os .path .join (root , f ) for f in all_filenames if _should_format (f )
111
111
]
112
+ any_error = False
112
113
for file in all_filenames :
113
114
plugin = Plugin .from_filename (file )
114
115
for error in sorted (plugin .run ()):
115
- print (f"{ file } :{ error } " )
116
+ print (f"{ file } :{ error } " , file = sys .stderr )
117
+ any_error = True
116
118
if plugin .options .autofix :
117
119
with open (file , "w" ) as file :
118
120
file .write (plugin .module .code )
121
+ return 1 if any_error else 0
119
122
120
123
121
124
class Plugin :
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def local_file(name: str) -> Path:
29
29
license = "MIT" ,
30
30
description = "A highly opinionated flake8 plugin for Trio-related problems." ,
31
31
zip_safe = False ,
32
- install_requires = ["flake8" ],
32
+ install_requires = ["flake8" , "libcst" ],
33
33
python_requires = ">=3.9" ,
34
34
classifiers = [
35
35
"Development Status :: 3 - Alpha" ,
You can’t perform that action at this time.
0 commit comments