diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b470684 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,20 @@ +[tool.ruff] +line-length = 88 + +select = ["E", "F", "I"] +ignore = [ "E501" ] + +[tool.mypy] +python_version = "3.10" +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/run-tests.nix b/run-tests.nix index 189198e..ae908cc 100644 --- a/run-tests.nix +++ b/run-tests.nix @@ -4,6 +4,8 @@ direnv, mypy, python3, + lib, + ruff }: writeScript "run-tests" '' set -e @@ -11,12 +13,12 @@ writeScript "run-tests" '' echo run shellcheck ${shellcheck}/bin/shellcheck direnvrc echo run black - LC_ALL=en_US.utf-8 ${python3.pkgs.black}/bin/black --check . - echo run flake8 - ${python3.pkgs.flake8}/bin/flake8 --ignore E501 tests + LC_ALL=en_US.utf-8 ${lib.getExe python3.pkgs.black} --check . + echo run ruff + ${lib.getExe ruff} tests echo run mypy - ${mypy}/bin/mypy tests + ${lib.getExe mypy} tests echo run unittest - ${python3.pkgs.pytest}/bin/pytest . + ${lib.getExe python3.pkgs.pytest} . ''