mirror of
https://github.com/nix-community/nix-direnv.git
synced 2024-08-16 15:00:31 +03:00
switch from flake8 to ruff
This commit is contained in:
parent
28a0597659
commit
54f99b4998
20
pyproject.toml
Normal file
20
pyproject.toml
Normal file
@ -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
|
@ -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} .
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user