diff --git a/pyproject.toml b/pyproject.toml index ccefaaa..668d713 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"] diff --git a/requirements-dev.txt b/requirements-dev.txt index 123303c..c0cd069 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -19,3 +19,4 @@ mypy types-pillow types-tqdm types-xxhash +ruff diff --git a/setup.cfg b/setup.cfg index 9460795..5e43fe5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/src/photomanager/check_media_integrity b/src/photomanager/check_media_integrity index 8162867..0694a0d 160000 --- a/src/photomanager/check_media_integrity +++ b/src/photomanager/check_media_integrity @@ -1 +1 @@ -Subproject commit 81628676ef7e92b524a9249cd9167a70ab6bd34a +Subproject commit 0694a0d9cc22ea83a71d3ba9737b82fb67328069 diff --git a/stubs/blake3/blake3.pyi b/stubs/blake3/blake3.pyi index 23db515..9ba08e1 100644 --- a/stubs/blake3/blake3.pyi +++ b/stubs/blake3/blake3.pyi @@ -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] = ...