Skip to content

Commit

Permalink
🧎‍♀️ Genuflect to the types.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 22, 2024
1 parent e2bc60b commit e988680
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/compat/py38.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


if (3, 9) <= sys.version_info < (3, 11): # pragma: no cover
from importlib.abc import Traversable
from importlib.abc import Traversable # type: ignore[attr-defined, unused-ignore]
elif sys.version_info < (3, 9): # pragma: no cover
from importlib_resources.abc import Traversable

Expand Down
6 changes: 5 additions & 1 deletion zipp/compat/py310.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ def _text_encoding(encoding, stacklevel=2, /): # pragma: no cover
return encoding


text_encoding = io.text_encoding if sys.version_info > (3, 10) else _text_encoding
text_encoding = (
io.text_encoding # type: ignore[unused-ignore, attr-defined]
if sys.version_info > (3, 10)
else _text_encoding
)

0 comments on commit e988680

Please sign in to comment.