We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4b8131 commit 5032e23Copy full SHA for 5032e23
openslide/__init__.py
@@ -69,7 +69,7 @@ class AbstractSlide:
69
"""The base class of a slide object."""
70
71
def __init__(self) -> None:
72
- self._profile = None
+ self._profile: bytes | None = None
73
74
def __enter__(self) -> AbstractSlide:
75
return self
@@ -387,7 +387,9 @@ def detect_format(cls, filename: str | bytes | Path) -> str | None:
387
If the file format is not recognized, return None."""
388
try:
389
with Image.open(filename) as img:
390
- return img.format
+ # img currently resolves as Any
391
+ # https://github.com/python-pillow/Pillow/pull/8362
392
+ return img.format # type: ignore[no-any-return]
393
except OSError:
394
return None
395
0 commit comments