Skip to content

Commit 6f5bd1b

Browse files
committed
Start linting test files testing the new code
Exclude regexs/globs are needed to exclude the test files testing the old code. After we remove those files we will be able to remove the exclude regex/globs. Signed-off-by: Martin Vrachev <[email protected]>
1 parent b900317 commit 6f5bd1b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pyproject.toml

+8
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ build-backend = "setuptools.build_meta"
77
# Read more here: https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
88
[tool.black]
99
line-length=80
10+
# TODO: remove "excludes" after deleting old test files
11+
exclude="tests/.*old.py"
1012

1113
# Isort section
1214
# Read more here: https://pycqa.github.io/isort/docs/configuration/config_files.html
1315
[tool.isort]
1416
profile="black"
1517
line_length=80
1618
known_first_party = ["tuf"]
19+
# TODO: remove "skip_glob" after deleting old test files
20+
skip_glob="*old.py"
1721

1822
# Pylint section
1923

@@ -55,6 +59,8 @@ module-rgx="^(_?[a-z][a-z0-9_]*|__init__)$"
5559
no-docstring-rgx="(__.*__|main|test.*|.*test|.*Test)$"
5660
variable-rgx="^[a-z][a-z0-9_]*$"
5761
docstring-min-length=10
62+
# TODO: remove "ignore-patterns" after deleting old test files
63+
ignore-patterns=".*_old.py"
5864

5965
[tool.pylint.logging]
6066
logging-format-style="old"
@@ -76,6 +82,8 @@ strict_equality = "True"
7682
disallow_untyped_defs = "True"
7783
disallow_untyped_calls = "True"
7884
show_error_codes = "True"
85+
# TODO: remove "exclude" after deleting old test files
86+
exclude=".*_old.py"
7987

8088
[[tool.mypy.overrides]]
8189
module = [

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ commands =
3838

3939
[testenv:lint]
4040
changedir = {toxinidir}
41-
lint_dirs = tuf/api tuf/ngclient examples
41+
lint_dirs = tuf/api tuf/ngclient examples tests
4242
commands =
4343
# Use different configs for new (tuf/api/*) and legacy code
4444
black --check --diff {[testenv:lint]lint_dirs}

0 commit comments

Comments
 (0)