Skip to content

Commit

Permalink
linting fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Coniferish committed Sep 13, 2024
1 parent d209db5 commit ef2277e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unstructured_inference/inference/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def from_image_file(
try:
image = Image.open(filename)
format = image.format
images = []
images: list[Image.Image]= []
for i, im in enumerate(ImageSequence.Iterator(image)):
im = im.convert("RGB")
im.format = format
Expand Down Expand Up @@ -143,7 +143,7 @@ def __init__(
image_metadata = {}
self.image_metadata = image_metadata
self.image_path = image_path
self.image_array: Union[np.ndarray, None] = None
self.image_array: Union[np.ndarray[Any, Any], None] = None
self.document_filename = document_filename
self.number = number
self.detection_model = detection_model
Expand Down Expand Up @@ -198,7 +198,7 @@ def get_elements_with_detection_model(

return inferred_layout

def _get_image_array(self) -> Union[np.ndarray, None]:
def _get_image_array(self) -> Union[np.ndarray[Any, Any], None]:
"""Converts the raw image into a numpy array."""
if self.image_array is None:
if self.image:
Expand Down

0 comments on commit ef2277e

Please sign in to comment.