Mercurial > p > roundup > code
comparison pyproject.toml @ 7831:9c58f5940c20
chore(lint)
update tests add a number of error tests (E) to make it more like the
flake8 whitespace and format checks. Also untabify file. Use spaces.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 24 Mar 2024 15:17:30 -0400 |
| parents | 1b7162938988 |
| children | 736f769b48c8 |
comparison
equal
deleted
inserted
replaced
| 7830:1b326a3d76b4 | 7831:9c58f5940c20 |
|---|---|
| 36 "roundup/anypy/vendored/*.py", | 36 "roundup/anypy/vendored/*.py", |
| 37 "dicttoxml.py" | 37 "dicttoxml.py" |
| 38 ] | 38 ] |
| 39 | 39 |
| 40 [tool.ruff.lint] | 40 [tool.ruff.lint] |
| 41 preview = true | |
| 42 explicit-preview-rules = true | |
| 43 | |
| 41 select = [ | 44 select = [ |
| 42 "A", # flake-8-builtins shadowing a builtin | 45 "A", # flake-8-builtins shadowing a builtin |
| 43 "ARG", # flake8-unused-arguments | 46 "ARG", # flake8-unused-arguments |
| 44 "B", # flake8-bugbear | 47 "B", # flake8-bugbear |
| 45 "C4", # flake8-comprehensions | 48 "C4", # flake8-comprehensions |
| 46 "C901", # McCabe complexity | 49 "C901", # McCabe complexity |
| 47 "COM", # flake8-commas | 50 "COM", # flake8-commas |
| 48 "E", | 51 "E", # errors |
| 49 "F", # pyflakes | 52 # enable preview rules: |
| 50 "G", # logging format _(.... % ...) bad use _(...) % ... | 53 # Error rules indentation |
| 54 "E111", "E112", "E113", | |
| 55 # Error whitespace in brackets/around punctuation | |
| 56 # around params, tabs/space around operators | |
| 57 "E201", "E202", "E203", "E211", "E222", "E223", "E224", | |
| 58 "E225", "E226", "E227", "E228", "E231", "E241", "E242", | |
| 59 "E251", "E252", "E271", "E272", "E275", | |
| 60 # Error blank lines between methods, classes etc. | |
| 61 "E301", "E302", "E303", "E304", "E305", "E306", | |
| 62 | |
| 63 "F", # pyflakes | |
| 64 "G", # logging format _(.... % ...) bad use _(...) % ... | |
| 51 "I", # imports | 65 "I", # imports |
| 52 "INT", # check gettext | 66 "INT", # check gettext |
| 53 "Q", # quoting consistancy | 67 "Q", # quoting consistancy |
| 54 "PERF", # performance lint | 68 "PERF", # performance lint |
| 55 "PIE794", # duplicate class field definition | 69 "PIE794", # duplicate class field definition |
| 56 "PL", # pylint | 70 "PL", # pylint |
| 57 "RET", # check for inconistent returns | 71 "PLW", # warnings |
| 58 "RUF", # ruff | 72 "RET", # check for inconistent returns |
| 59 "S", # bandit - security | 73 "RUF", # ruff |
| 60 "SIM", # simplify code | 74 "S", # bandit - security |
| 61 "T10", # flake8-debugger | 75 "SIM", # simplify code |
| 62 "W", # pycode whitespace warnings | 76 "T10", # flake8-debugger |
| 77 "W", # pycode whitespace warnings | |
| 63 ] | 78 ] |
| 64 | 79 |
| 65 ignore = [ | 80 ignore = [ |
| 66 # raise from except hander with none or chaining; only python3 | 81 # raise from except hander with none or chaining; only python3 |
| 67 "B904", | 82 "B904", |
| 100 max-branches=20 | 115 max-branches=20 |
| 101 max-statements = 100 | 116 max-statements = 100 |
| 102 | 117 |
| 103 [tool.ruff.lint.mccabe] | 118 [tool.ruff.lint.mccabe] |
| 104 max-complexity = 50 | 119 max-complexity = 50 |
| 105 | |
| 106 # | |
| 107 #skip= | |
| 108 # C901 | |
| 109 # E228 | |
| 110 # E302 | |
| 111 # E401 |
