metadata-scrubber-tool:
implemented fix mypy type checking issues for piexif(it has no stub files) used basedpyright to generate a type stub, but damn that a lot more type related issues fixed most but a few remained so i modified the pyrightconfig with this: "typeCheckingMode": "standard" as it is in strict mode by default.
This commit is contained in:
parent
aabecd547f
commit
6487286cae
|
|
@ -1,2 +1,49 @@
|
|||
.venv
|
||||
__pycache__
|
||||
# ============== Python ==============
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.so
|
||||
.Python
|
||||
*.egg-info/
|
||||
*.egg
|
||||
dist/
|
||||
build/
|
||||
|
||||
# ============== Virtual Environment ==============
|
||||
.venv/
|
||||
venv/
|
||||
ENV/
|
||||
|
||||
# ============== IDE / Editor ==============
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
.qodo/
|
||||
|
||||
# ============== Testing ==============
|
||||
.pytest_cache/
|
||||
.coverage
|
||||
htmlcov/
|
||||
coverage.xml
|
||||
*.cover
|
||||
|
||||
# ============== Type Checking ==============
|
||||
.mypy_cache/
|
||||
.pyright/
|
||||
|
||||
# ============== Linting ==============
|
||||
.ruff_cache/
|
||||
|
||||
# ============== Environment ==============
|
||||
.env
|
||||
.env.local
|
||||
*.log
|
||||
|
||||
# ============== OS Generated ==============
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# ============== Project Specific ==============
|
||||
# Output directory for processed images
|
||||
tests/assets/output/
|
||||
|
|
@ -21,4 +21,3 @@ def merge_segments(segments, exif=...): # -> bytes:
|
|||
"""Merges Exif with APP0 and APP1 manipulations.
|
||||
"""
|
||||
...
|
||||
|
||||
|
|
|
|||
|
|
@ -17,4 +17,3 @@ def dump(exif_dict_original): # -> bytes:
|
|||
:rtype: bytes
|
||||
"""
|
||||
...
|
||||
|
||||
|
|
|
|||
|
|
@ -4,5 +4,3 @@ This type stub file was generated by pyright.
|
|||
|
||||
class InvalidImageDataError(ValueError):
|
||||
...
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,4 +14,3 @@ def insert(exif, image, new_file=...): # -> None:
|
|||
:param str filename: JPEG
|
||||
"""
|
||||
...
|
||||
|
||||
|
|
|
|||
|
|
@ -21,12 +21,9 @@ def load(input_data, key_is_name=...): # -> dict[str, Any]:
|
|||
class _ExifReader:
|
||||
def __init__(self, data) -> None:
|
||||
...
|
||||
|
||||
|
||||
def get_ifd_dict(self, pointer, ifd_name, read_unknown=...): # -> dict[Any, Any]:
|
||||
...
|
||||
|
||||
|
||||
def convert_value(self, val): # -> Any | tuple[Any, Any] | bytes | tuple[Any, ...] | tuple[tuple[Any, Any], ...]:
|
||||
...
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,4 +13,3 @@ def remove(src, new_file=...): # -> None:
|
|||
:param str filename: JPEG
|
||||
"""
|
||||
...
|
||||
|
||||
|
|
|
|||
|
|
@ -14,4 +14,3 @@ def transplant(exif_src, image, new_file=...): # -> None:
|
|||
:param str filename2: JPEG
|
||||
"""
|
||||
...
|
||||
|
||||
|
|
|
|||
|
|
@ -25,4 +25,3 @@ def insert(webp_bytes, exif_bytes): # -> bytes:
|
|||
|
||||
def remove(webp_bytes): # -> bytes:
|
||||
...
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class UserComment:
|
|||
or the encoding is unsupported.
|
||||
"""
|
||||
...
|
||||
|
||||
|
||||
@classmethod
|
||||
def dump(cls, data, encoding=...):
|
||||
"""
|
||||
|
|
@ -39,6 +39,3 @@ class UserComment:
|
|||
:raises: ValueError if the encoding is unsupported.
|
||||
"""
|
||||
...
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue