mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-29 05:31:09 +01:00
switch from flake8 to ruff
This commit is contained in:
parent
28a0597659
commit
54f99b4998
2 changed files with 27 additions and 5 deletions
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,
|
direnv,
|
||||||
mypy,
|
mypy,
|
||||||
python3,
|
python3,
|
||||||
|
lib,
|
||||||
|
ruff
|
||||||
}:
|
}:
|
||||||
writeScript "run-tests" ''
|
writeScript "run-tests" ''
|
||||||
set -e
|
set -e
|
||||||
|
|
@ -11,12 +13,12 @@ writeScript "run-tests" ''
|
||||||
echo run shellcheck
|
echo run shellcheck
|
||||||
${shellcheck}/bin/shellcheck direnvrc
|
${shellcheck}/bin/shellcheck direnvrc
|
||||||
echo run black
|
echo run black
|
||||||
LC_ALL=en_US.utf-8 ${python3.pkgs.black}/bin/black --check .
|
LC_ALL=en_US.utf-8 ${lib.getExe python3.pkgs.black} --check .
|
||||||
echo run flake8
|
echo run ruff
|
||||||
${python3.pkgs.flake8}/bin/flake8 --ignore E501 tests
|
${lib.getExe ruff} tests
|
||||||
echo run mypy
|
echo run mypy
|
||||||
${mypy}/bin/mypy tests
|
${lib.getExe mypy} tests
|
||||||
|
|
||||||
echo run unittest
|
echo run unittest
|
||||||
${python3.pkgs.pytest}/bin/pytest .
|
${lib.getExe python3.pkgs.pytest} .
|
||||||
''
|
''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue