diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2023-03-14 19:43:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 19:43:31 +0100 |
commit | ce07459e1e6cd636dd3c4bb26b7cadeec8de6001 (patch) | |
tree | fe6d6bdec9a9b8fa3ced6f6f11a52b4bc6c5a3c1 /pyproject.toml | |
parent | 886da706f0f88df667099dad915a581338779ef1 (diff) | |
download | astroid-git-ce07459e1e6cd636dd3c4bb26b7cadeec8de6001.tar.gz |
Upgrade pre-commit configuration and move to ruff (#2057)
Diffstat (limited to 'pyproject.toml')
-rw-r--r-- | pyproject.toml | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/pyproject.toml b/pyproject.toml index bd8da840..74971788 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,14 +65,6 @@ python_files = ["*test_*.py"] testpaths = ["tests"] filterwarnings = "error" -[tool.isort] -include_trailing_comma = true -known_first_party = ["astroid"] -known_third_party = ["attr", "nose", "numpy", "pytest", "six", "sphinx"] -line_length = 88 -multi_line_output = 3 -skip_glob = ["tests/testdata"] - [tool.mypy] enable_error_code = "ignore-without-code" no_implicit_optional = true @@ -94,3 +86,36 @@ module = [ "wrapt.*", ] ignore_missing_imports = true + + +[tool.ruff] + +# ruff is less lenient than pylint and does not make any exceptions +# (for docstrings, strings and comments in particular). +line-length = 110 + +select = [ + "E", # pycodestyle + "F", # pyflakes + "W", # pycodestyle + "B", # bugbear + "I", # isort + "RUF", # ruff +] + +ignore = [ + "B905", # `zip()` without an explicit `strict=` parameter + "F401", # API + "RUF100", # ruff does not understand pylint's directive usefulness +] + +fixable = [ + "E", # pycodestyle + "F", # pyflakes + "W", # pycodestyle + "B", # bugbear + "I", # isort + "RUF", # ruff +] +unfixable = [] +target-version = "py37" |