Move to ruff and pyproject.toml

This commit is contained in:
Kovid Goyal 2023-01-10 19:09:26 +05:30
parent e5992f9d87
commit a981e08b2c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 22 additions and 13 deletions

22
pyproject.toml Normal file
View File

@ -0,0 +1,22 @@
[tool.ruff]
line-length = 160
target-version = 'py37'
select = ['E', 'F']
ignore = ['E741', 'E402', 'E722', 'E401']
builtins = ['_']
[tool.ruff.per-file-ignores]
"src/calibre/ebooks/unihandecode/unicodepoints.py" = ["E501"]
"src/qt/__init__.py" = ["E501"]
[tool.black]
target-version = ['py37']
[tool.isort]
profile = "black"
combine_as_imports = true
multi_line_output = 5
known_future_library = "__python__"
known_third_party = "qt"
known_standard_library = "aes,elementmaker,encodings"
known_first_party = "calibre_extensions"

View File

@ -1,13 +0,0 @@
[flake8]
max-line-length = 160
builtins = _,__,P,I,lopen,icu_lower,icu_upper,icu_title,ngettext,connect_lambda
ignore = E12,E203,E22,E231,E241,E401,E402,E503,E731,W391,E722,E741,W504,W203
[isort]
profile = black
combine_as_imports = True
multi_line_output = 5
known_future_library = __python__
known_third_party = qt
known_standard_library = aes,elementmaker,encodings
known_first_party = calibre_extensions