File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed
Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ ignore = [
2525 " TD003" , # Ignore Missing issue link in TODOs (often not required/available)
2626 " T201" , # Ignore print presence
2727 " RUF012" , # Ignore Mutable class attributes should be annotated with `typing.ClassVar`
28+ " E501" , # Ignore line length (handled by Ruff's dynamic line length)
29+ " ANN002" ,
30+ " ANN003" ,
2831]
2932
3033select = [
@@ -77,6 +80,7 @@ exclude = [
7780 " node_modules" ,
7881 " venv" ,
7982 " */migrations/*" ,
83+ " test_*" ,
8084]
8185
8286[lint .isort ]
@@ -134,6 +138,7 @@ inline-quotes = "single"
134138"types.py" = [" D" , " E501" , " N815" ] # Ignore docstring and annotation issues in types.py
135139
136140[format ]
141+ exclude = [" types.py" ]
137142docstring-code-format = true
138143docstring-code-line-length = " dynamic" # Or set to 80
139144quote-style = " single"
Original file line number Diff line number Diff line change 5353 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5454 LOG_LEVEL : WARN
5555 SHELLCHECK_OPTS : -e SC1091 -e 2086
56- VALIDATE_ALL_CODEBASE : true
5756 VALIDATE_PYTHON_BLACK : false
5857 VALIDATE_PYTHON_FLAKE8 : false
5958 VALIDATE_PYTHON_ISORT : false
Original file line number Diff line number Diff line change 77 "editor.defaultFormatter" : " charliermarsh.ruff" ,
88 "editor.formatOnSave" : true ,
99 "editor.codeActionsOnSave" : {
10- "source.organizeImports " : " always "
10+ "source.fixAll.ruff " : " explicit "
1111 }
1212 },
13- "ruff.importStrategy" : " fromEnvironment"
13+ "ruff.importStrategy" : " fromEnvironment" ,
14+ "ruff.lint.args" : [
15+ " --config" ,
16+ " .github/linters/.ruff.toml"
17+ ],
18+ "ruff.format.args" : [
19+ " --config" ,
20+ " .github/linters/.ruff.toml"
21+ ]
1422}
Original file line number Diff line number Diff line change 3636
3737
3838@nox .session (python = DEFAULT_PYTHON_VERSION )
39- def format (session ):
39+ def format (session ) -> None :
4040 """Format Python code using autoflake, pyupgrade, and ruff."""
4141 # Sort Spelling Allowlist
4242 spelling_allow_file = '.github/actions/spelling/allow.txt'
@@ -141,10 +141,14 @@ def format(session):
141141 'ruff' ,
142142 'check' ,
143143 '--fix-only' ,
144+ '--config' ,
145+ '.github/linters/.ruff.toml' ,
144146 * lint_paths_py ,
145147 )
146148 session .run (
147149 'ruff' ,
148150 'format' ,
151+ '--config' ,
152+ '.github/linters/.ruff.toml' ,
149153 * lint_paths_py ,
150154 )
You can’t perform that action at this time.
0 commit comments