diff --git a/pyproject.toml b/pyproject.toml index 2ef3fb2d1..c660752c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,7 +117,7 @@ ignore = [ "E221", # Multiple spaces before operator "E226", # Missing whitespace around arithmetic operator "E241", # Multiple spaces after ',' - "PYI034", # flake8-pyi: typing.Self added in Python 3.10 + "PYI034", # flake8-pyi: typing.Self added in Python 3.11 ] [tool.ruff.lint.per-file-ignores] diff --git a/src/PIL/TiffTags.py b/src/PIL/TiffTags.py index 3f2220c2a..469d4def9 100644 --- a/src/PIL/TiffTags.py +++ b/src/PIL/TiffTags.py @@ -22,11 +22,11 @@ from typing import NamedTuple class _TagInfo(NamedTuple): - value: int + value: int | None name: str - type: int - length: int - enum: dict[int, str] + type: int | None + length: int | None + enum: dict[int, str] | None class TagInfo(_TagInfo):