Skip to content

Commit 1a4e273

Browse files
committed
move pytest configuration to pyproject.toml add linting ignores
1 parent 2baf0fd commit 1a4e273

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

pyproject.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,38 @@ ignore = [
7878
"D206", # Docstrings should be indented with spaces; unnecessary when running ruff-format
7979
"E501", # Line length too long; unnecessary when running ruff-format
8080
"W191", # Indentation contains tabs; unnecessary when running ruff-format
81+
82+
# REMOVE THESE AS FIXED
83+
"ANN001", # Missing type annotation for function argument
84+
"ANN202", # Missing return type annotation for private function
85+
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
86+
"ARG001", # Unused function argument
87+
"ARG002", # Unused method argument
88+
"B018", # Found useless expression
89+
"D101", # Missing docstring in public class
90+
"D102", # Missing docstring in public method
91+
"D103", # Missing docstring in public function
92+
"D107", # Missing docstring in `__init__`
93+
"D401", # First line of docstring should be in imperative mood
94+
"ERA001", # Found commented-out code
95+
"FIX002", # Line contains TODO
96+
"N802", # Function name should be lowercase
97+
"PD002", # `inplace=True` should be avoided
98+
"PD004", # `.notna` is preferred to `.notnull`
99+
"PT009", # Use a regular `assert` instead of unittest-style
100+
"PT027", # Use `pytest.raises` instead of unittest-style `assertRaises`
101+
"RET505", # Unnecessary `elif` after `return` statement
102+
"RET506", # Unnecessary `else` after `raise` statement
103+
"SIM105", # Use `contextlib.suppress` instead of `try`-`except`-`pass`
104+
"UP008", # Use `super()` instead of `super(__class__, self)`
105+
"UP031", # Use format specifiers instead of percent format
81106
]
82107

83108

84109
[tool.ruff.lint.per-file-ignores]
85110
"__init__.py" = ["F401"]
111+
112+
[tool.pytest.ini_options]
113+
addopts = "--import-mode=importlib"
114+
testpaths = ["fairness_indicators"]
115+
python_files = ["*_test.py"]

pytest.ini

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)