Skip to content

Commit

Permalink
Add ruff to linters
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronkollasch committed Mar 12, 2023
1 parent a4d8c45 commit 2b13e82
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,17 @@ venvPath = "./"

reportMissingImports = true
reportMissingTypeStubs = false

[tool.ruff]
extend-exclude = [
"**/node_modules",
"**/__pycache__",
"src/typestubs",
"src/photomanager/check_media_integrity",
]
unfixable = ["F401"]

# Ignore `E402` (import violations) in all `__init__.py` files
[tool.ruff.per-file-ignores]
"__init__.py" = ["E402", "F401"]
"__init__.pyi" = ["F403"]
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ mypy
types-pillow
types-tqdm
types-xxhash
ruff
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ deps =
types-pillow
types-tqdm
types-xxhash
ruff
commands =
black --check --diff .
isort --check --diff .
ruff check --diff .
flake8 --count src tests benchmarks
mypy src

Expand Down
2 changes: 1 addition & 1 deletion src/photomanager/check_media_integrity
4 changes: 1 addition & 3 deletions stubs/blake3/blake3.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from hashlib import _Hash
from typing import Any, ClassVar

from _typeshed import ReadableBuffer, Self
from typing import ClassVar

class blake3(_Hash):
AUTO: ClassVar[int] = ...
Expand Down

0 comments on commit 2b13e82

Please sign in to comment.