update python ci tooling (add ruff, drop flake8
This commit is contained in:
parent
466559a0c7
commit
8222cf135b
3 changed files with 24 additions and 22 deletions
|
|
@ -1,3 +1,10 @@
|
|||
[tool.ruff]
|
||||
target-version = "py311"
|
||||
line-length = 88
|
||||
|
||||
select = ["E", "F", "I"]
|
||||
ignore = ["E501"]
|
||||
|
||||
[tool.black]
|
||||
line-length = 88
|
||||
include = '\.pyi?$'
|
||||
|
|
@ -7,3 +14,18 @@ exclude = '''
|
|||
| \.mypy_cache
|
||||
)/
|
||||
'''
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.11"
|
||||
warn_redundant_casts = true
|
||||
disallow_untyped_calls = true
|
||||
disallow_untyped_defs = true
|
||||
no_implicit_optional = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "setuptools.*"
|
||||
ignore_missing_imports = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "pytest.*"
|
||||
ignore_missing_imports = true
|
||||
|
|
|
|||
20
ci/setup.cfg
20
ci/setup.cfg
|
|
@ -1,20 +0,0 @@
|
|||
[wheel]
|
||||
universal = 1
|
||||
|
||||
[pycodestyle]
|
||||
max-line-length = 88
|
||||
ignore = E501,E741,W503
|
||||
|
||||
[flake8]
|
||||
max-line-length = 88
|
||||
ignore = E501,E741,W503
|
||||
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
|
||||
|
||||
[mypy-irc.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy]
|
||||
warn_redundant_casts = true
|
||||
disallow_untyped_calls = true
|
||||
disallow_untyped_defs = true
|
||||
no_implicit_optional = true
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p bash -i bash -p python3Packages.mypy -p python3Packages.black -p python3Packages.flake8 -p nix
|
||||
#!nix-shell -p bash -i bash -p mypy -p black -p ruff -p nix
|
||||
|
||||
set -eux -o pipefail # Exit with nonzero exit code if anything fails
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ mypy nur
|
|||
# Format checker
|
||||
black --check .
|
||||
# Linter
|
||||
flake8 .
|
||||
ruff .
|
||||
|
||||
cd "${DIR}/.."
|
||||
nix run "${DIR}#" -- format-manifest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue