mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Added type hints
This commit is contained in:
parent
9923531742
commit
ffd0363b65
|
@ -15,7 +15,7 @@ import math
|
|||
from . import Image, ImageFile
|
||||
|
||||
|
||||
def _accept(prefix):
|
||||
def _accept(prefix: bytes) -> bool:
|
||||
return prefix[:6] == b"SIMPLE"
|
||||
|
||||
|
||||
|
@ -23,8 +23,10 @@ class FitsImageFile(ImageFile.ImageFile):
|
|||
format = "FITS"
|
||||
format_description = "FITS"
|
||||
|
||||
def _open(self):
|
||||
headers = {}
|
||||
def _open(self) -> None:
|
||||
assert self.fp is not None
|
||||
|
||||
headers: dict[bytes, bytes] = {}
|
||||
while True:
|
||||
header = self.fp.read(80)
|
||||
if not header:
|
||||
|
|
|
@ -3484,7 +3484,7 @@ def register_extension(id, extension) -> None:
|
|||
EXTENSION[extension.lower()] = id.upper()
|
||||
|
||||
|
||||
def register_extensions(id, extensions):
|
||||
def register_extensions(id, extensions) -> None:
|
||||
"""
|
||||
Registers image extensions. This function should not be
|
||||
used in application code.
|
||||
|
|
Loading…
Reference in New Issue
Block a user