-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathruff-test.toml
More file actions
23 lines (20 loc) · 1.33 KB
/
ruff-test.toml
File metadata and controls
23 lines (20 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
extend = "./ruff.toml"
[lint]
ignore = [
"D100", # no module docstrings needed for tests
"D101", # no class docstrings needed for tests
"D102", # no method docstrings needed for tests
"D103", # no function docstrings needed for tests
"D104", # no package docstrings needed for tests
"FBT001", # booleans are often used in parametrized test cases as positional arguments, and test function argument specifications cannot usually easily include keyword arguments anyway
"N802", # test function naming conventions differ from source code
"S101", # assert is definitely needed in test cases
"S311", # pseudo-randomness is fine for test cases
"TID252", # sometimes you can't use absolute imports in test cases for importing things within the tests, because they're not a true package or have conflicting namespaces
"TRY003", # tests don't need to create custom exception classes, generally you want to throw an AssertionError with a message anyway
]
unfixable = [
"SIM117", # pytest.raises context managers should generally be separate from others so they can be very specific about where the error is being raised from, so don't autofix this
]
[lint.flake8-pytest-style]
raises-require-match-for = ["*"] # ensures we always have a match for our raises statements so that we validate tests fail for the right reason