Move to pyproject.toml and ruff

This commit is contained in:
Kovid Goyal 2023-01-09 15:49:49 +05:30
parent 44866a6e79
commit d248d5ad75
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 25 additions and 30 deletions

22
pyproject.toml Normal file
View File

@ -0,0 +1,22 @@
[tool.mypy]
files = 'kitty,kittens,glfw,*.py,docs/conf.py,shell-integration/ssh/askpass.py'
no_implicit_optional = true
sqlite_cache = true
cache_fine_grained = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
check_untyped_defs = true
disallow_untyped_defs = true
disallow_untyped_decorators = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
strict = true
no_implicit_reexport = true
[tool.ruff]
line-length = 160
target-version = 'py38'
select = ['E', 'F']

View File

@ -1,9 +1,9 @@
" Scan the following dirs recursively for tags " Scan the following dirs recursively for tags
let g:project_tags_dirs = ['kitty', 'kittens'] let g:project_tags_dirs = ['kitty', 'kittens', 'tools']
if exists('g:ale_linters') if exists('g:ale_linters')
let g:ale_linters['python'] = ['mypy', 'flake8'] let g:ale_linters['python'] = ['mypy', 'ruff']
else else
let g:ale_linters = {'python': ['mypy', 'flake8']} let g:ale_linters = {'python': ['mypy', 'ruff']}
endif endif
let g:ale_python_mypy_executable = './mypy-editor-integration' let g:ale_python_mypy_executable = './mypy-editor-integration'
let g:ycm_python_binary_path = 'python3' let g:ycm_python_binary_path = 'python3'

View File

@ -1,27 +0,0 @@
[flake8]
max-line-length = 160
exclude==template.py,linux-package
extend_ignore=W503,E203
[isort]
profile = black
combine_as_imports = True
multi_line_output = 5
[mypy]
files = kitty,kittens,glfw,*.py,docs/conf.py,shell-integration/ssh/askpass.py
no_implicit_optional = True
sqlite_cache = True
cache_fine_grained = True
warn_redundant_casts = True
warn_unused_ignores = True
warn_return_any = True
warn_unreachable = True
warn_unused_configs = True
check_untyped_defs = True
disallow_untyped_defs = True
disallow_untyped_decorators = True
disallow_untyped_calls = True
disallow_incomplete_defs = True
strict = True
no_implicit_reexport = True