From 98c7d90af613a9d5e726361303ceea86b2998bda Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 27 Mar 2024 09:16:31 +0200 Subject: [PATCH] Variables can be None; update comment Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- pyproject.toml | 2 +- src/PIL/TiffTags.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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):