1+ [tool .ruff ]
2+ # See https://github.com/charliermarsh/ruff#rules for error code definitions.
3+ select = [
4+ # "ANN", # annotations TODO
5+ " B" , # bugbear
6+ " C4" , # comprehensions
7+ " DTZ" , # naive datetime
8+ " E" , # style errors
9+ " F" , # flakes
10+ " I" , # import sorting
11+ " ISC" , # string concatenation
12+ " N" , # naming
13+ " PGH" , # pygrep-hooks
14+ " PIE" , # miscellaneous
15+ " PLC" , # pylint convention
16+ " PLE" , # pylint error
17+ # "PLR", # pylint refactor TODO
18+ " PLW" , # pylint warning
19+ " Q" , # quotes
20+ " RUF" , # Ruff
21+ " S" , # security
22+ " SIM" , # simplify
23+ " T10" , # debugger
24+ " UP" , # upgrade
25+ " W" , # style warnings
26+ " YTT" , # sys.version
27+ ]
28+ # Ignore list taken from https://github.com/psf/black/blob/master/.flake8
29+ # E203 Whitespace before ':'
30+ # E266 Too many leading '#' for block comment
31+ # E501 Line too long (82 > 79 characters)
32+ # W503 Line break occurred before a binary operator
33+ # But we don't specify them because ruff's Black already
34+ # checks for it.
35+ # See https://github.com/charliermarsh/ruff/issues/1842#issuecomment-1381210185
36+ extend-ignore = [
37+ " E501" ,
38+ " S101" , # Use of `assert` detected
39+ " B017" , # `assertRaises(Exception)` should be considered evil TODO
40+ " PGH004" , # Use specific rule codes when using `noqa` TODO
41+ " B905" , # `zip()` without an explicit `strict=` parameter
42+ " N802" , # Function name should be lowercase
43+ " N999" , # Invalid module name. We should revisit this in the future, TODO
44+ " RUF012" , # Mutable class attributes should be annotated with `typing.ClassVar` TODO
45+ " S310" , # Audit URL open for permitted schemes. Allowing use of `file:` or custom schemes is often unexpected.
46+ " S603" , # `subprocess` call: check for execution of untrusted input
47+ ]
48+ extend-exclude = [" docs" , " build" ]
49+ # Hardcode to Python 3.8.
50+ # Reminder to update mesa-examples if the value below is changed.
51+ target-version = " py38"
0 commit comments