mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-04-01 14:52:29 -04:00
61 lines
1.6 KiB
TOML
61 lines
1.6 KiB
TOML
line-length = 160
|
|
target-version = 'py310'
|
|
builtins = ['_', 'I', 'P']
|
|
include = ['*.py', '*.recipe']
|
|
exclude = [
|
|
"*_ui.py",
|
|
"bypy/*",
|
|
"setup/polib.py",
|
|
"setup/linux-installer.py",
|
|
"src/css_selectors/*",
|
|
"src/polyglot/*",
|
|
"src/templite/*",
|
|
"src/tinycss/*",
|
|
]
|
|
|
|
[format]
|
|
quote-style = 'single'
|
|
|
|
[lint]
|
|
ignore = [
|
|
'E402', 'E722', 'E741',
|
|
'UP012', 'UP030', 'UP032', 'UP038', 'C413', 'C420',
|
|
]
|
|
select = [
|
|
'E', 'F', 'I', 'W', 'INT',
|
|
'Q', 'UP', 'YTT', 'TID', 'C4', 'COM818',
|
|
]
|
|
|
|
[lint.per-file-ignores]
|
|
"recipes/*" = ['UP']
|
|
"manual/plugin_examples/*" = ['UP']
|
|
"src/calibre/*" = ['UP031']
|
|
"src/calibre/ebooks/unihandecode/*codepoints.py" = ['E501']
|
|
"src/calibre/ebooks/metadata/sources/*" = ['UP']
|
|
"src/calibre/gui2/store/stores/*" = ['UP']
|
|
"src/calibre/gui2/tts/manager.py" = ['UP037']
|
|
"src/calibre/utils/copy_files.py" = ['UP037']
|
|
"src/qt/*.py" = ['I']
|
|
"src/qt/*.pyi" = ['I']
|
|
|
|
[lint.isort]
|
|
detect-same-package = true
|
|
extra-standard-library = ["aes", "elementmaker", "encodings"]
|
|
known-first-party = ["calibre_extensions", "calibre_plugins", "polyglot"]
|
|
known-third-party = ["odf", "qt", "templite", "tinycss", "css_selectors"]
|
|
relative-imports-order = "closest-to-furthest"
|
|
split-on-trailing-comma = false
|
|
section-order = ['__python__', "future", "standard-library", "third-party", "first-party", "local-folder"]
|
|
|
|
[lint.isort.sections]
|
|
'__python__' = ['__python__']
|
|
|
|
[lint.flake8-comprehensions]
|
|
allow-dict-calls-with-keyword-arguments = true
|
|
|
|
[lint.flake8-quotes]
|
|
avoid-escape = true
|
|
docstring-quotes = 'single'
|
|
inline-quotes = 'single'
|
|
multiline-quotes = 'single'
|