diff --git a/ci/pyproject.toml b/ci/pyproject.toml index 522832799..38c6ef4d0 100644 --- a/ci/pyproject.toml +++ b/ci/pyproject.toml @@ -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 diff --git a/ci/setup.cfg b/ci/setup.cfg deleted file mode 100644 index ad9e4daea..000000000 --- a/ci/setup.cfg +++ /dev/null @@ -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 diff --git a/ci/test.sh b/ci/test.sh index 8fe052db7..144eb2897 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -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