Skip to content

Commit dc214fc

Browse files
committed
Linting.
1 parent d316d70 commit dc214fc

File tree

131 files changed

+147
-139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+147
-139
lines changed

repo_helper/cli/commands/broomstick.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def depytestcache(base_dir: pathlib.Path, quiet: bool = False):
7373
:param quiet:
7474
"""
7575

76-
rmdir(base_dir / ".pytest_cache", quiet)
76+
for dirname in base_dir.rglob(".pytest_cache"):
77+
rmdir(dirname, quiet)
7778

7879

7980
def demolish(base_dir: pathlib.Path, quiet: bool = False):

repo_helper/files/testing.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
# 3rd party
3535
import jinja2
3636
from domdf_python_tools.paths import PathPlus
37+
from domdf_python_tools.stringlist import DelimitedList
3738
from domdf_python_tools.typing import PathLike
3839
from shippinglabel import normalize
3940
from shippinglabel.requirements import (
@@ -58,6 +59,17 @@
5859
]
5960

6061
allowed_rst_directives = ["envvar", "TODO", "extras-require"]
62+
standard_flake8_excludes = [
63+
".git",
64+
"__pycache__",
65+
"old",
66+
"build",
67+
"dist",
68+
"__pkginfo__.py",
69+
"setup.py",
70+
".tox",
71+
"venv",
72+
]
6173

6274

6375
class ToxConfig(IniConfigurator):
@@ -387,19 +399,14 @@ def flake8(self):
387399
"""
388400

389401
self._ini["flake8"]["max-line-length"] = "120"
390-
self._ini["flake8"]["select"] = ' '.join(str(x) for x in lint_warn_list + code_only_warning)
391-
392-
excludes = f".git,__pycache__,{self['docs_dir']},old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py,.tox,venv"
393-
self._ini["flake8"]["exclude"] = excludes
394-
# self._ini["flake8"]["rst-roles"] = indent_join(sorted(allowed_rst_roles))
402+
self._ini["flake8"]["select"] = f"{DelimitedList(lint_warn_list + code_only_warning): }"
403+
self._ini["flake8"]["exclude"] = ','.join([self["docs_dir"], *standard_flake8_excludes])
395404
self._ini["flake8"]["rst-directives"] = indent_join(sorted(allowed_rst_directives))
396-
397-
per_file_ignores = [
405+
self._ini["flake8"]["per-file-ignores"] = indent_join([
398406
'',
399407
f"{self['tests_dir']}/*: {' '.join(str(e) for e in code_only_warning)}",
400408
f"*/*.pyi: {' '.join(str(e) for e in code_only_warning)}",
401-
]
402-
self._ini["flake8"]["per-file-ignores"] = indent_join(per_file_ignores)
409+
])
403410
self._ini["flake8"]["pytest-parametrize-names-type"] = "csv"
404411
self._ini["flake8"]["inline-quotes"] = '"'
405412
self._ini["flake8"]["multiline-quotes"] = '"""'

tests/test_files/test_linting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_lint_roller_removal(tmp_pathplus, demo_environment):
1919
assert not (tmp_pathplus / managed_files[0]).exists()
2020
assert not (tmp_pathplus / managed_files[0]).is_file()
2121

22-
#
22+
2323
# def test_lint_roller_case_1(tmp_pathplus, demo_environment, file_regression: FileRegressionFixture):
2424
# managed_files = make_lint_roller(tmp_pathplus, demo_environment)
2525
# assert managed_files == ["lint_roller.sh"]

tests/test_files/test_testing_/test_make_tox_py_modules0_0_782_mypy_deps0__no_stubs_devmode_docs_.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ commands =
121121
[flake8]
122122
max-line-length = 120
123123
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E301 E302 E303 E304 E305 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
124-
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py,.tox,venv
124+
exclude = doc-source,.git,__pycache__,old,build,dist,__pkginfo__.py,setup.py,.tox,venv
125125
rst-directives =
126126
TODO
127127
envvar

tests/test_files/test_testing_/test_make_tox_py_modules0_0_782_mypy_deps0__no_stubs_devmode_no_docs_.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ commands =
112112
[flake8]
113113
max-line-length = 120
114114
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E301 E302 E303 E304 E305 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
115-
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py,.tox,venv
115+
exclude = doc-source,.git,__pycache__,old,build,dist,__pkginfo__.py,setup.py,.tox,venv
116116
rst-directives =
117117
TODO
118118
envvar

tests/test_files/test_testing_/test_make_tox_py_modules0_0_782_mypy_deps0__no_stubs_no_devmode_docs_.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ commands =
119119
[flake8]
120120
max-line-length = 120
121121
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E301 E302 E303 E304 E305 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
122-
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py,.tox,venv
122+
exclude = doc-source,.git,__pycache__,old,build,dist,__pkginfo__.py,setup.py,.tox,venv
123123
rst-directives =
124124
TODO
125125
envvar

tests/test_files/test_testing_/test_make_tox_py_modules0_0_782_mypy_deps0__no_stubs_no_devmode_no_docs_.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ commands =
110110
[flake8]
111111
max-line-length = 120
112112
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E301 E302 E303 E304 E305 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
113-
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py,.tox,venv
113+
exclude = doc-source,.git,__pycache__,old,build,dist,__pkginfo__.py,setup.py,.tox,venv
114114
rst-directives =
115115
TODO
116116
envvar

tests/test_files/test_testing_/test_make_tox_py_modules0_0_782_mypy_deps0__stubs_devmode_docs_.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ commands =
123123
[flake8]
124124
max-line-length = 120
125125
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E301 E302 E303 E304 E305 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
126-
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py,.tox,venv
126+
exclude = doc-source,.git,__pycache__,old,build,dist,__pkginfo__.py,setup.py,.tox,venv
127127
rst-directives =
128128
TODO
129129
envvar

tests/test_files/test_testing_/test_make_tox_py_modules0_0_782_mypy_deps0__stubs_devmode_no_docs_.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ commands =
114114
[flake8]
115115
max-line-length = 120
116116
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E301 E302 E303 E304 E305 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
117-
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py,.tox,venv
117+
exclude = doc-source,.git,__pycache__,old,build,dist,__pkginfo__.py,setup.py,.tox,venv
118118
rst-directives =
119119
TODO
120120
envvar

tests/test_files/test_testing_/test_make_tox_py_modules0_0_782_mypy_deps0__stubs_no_devmode_docs_.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ commands =
121121
[flake8]
122122
max-line-length = 120
123123
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E301 E302 E303 E304 E305 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000
124-
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py,.tox,venv
124+
exclude = doc-source,.git,__pycache__,old,build,dist,__pkginfo__.py,setup.py,.tox,venv
125125
rst-directives =
126126
TODO
127127
envvar

0 commit comments

Comments
 (0)