Skip to content

Commit

Permalink
fix type hinting for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Coniferish committed Oct 4, 2023
1 parent 2561928 commit a87efd2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions unstructured/file_utils/metadata.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import datetime
import io
from dataclasses import dataclass, field
from typing import IO, Any, Dict, Final, Iterable, Iterator, List, Optional
from typing import IO, Any, Dict, Final, Iterable, Iterator, List, Optional, Union

import docx
import openpyxl
Expand Down Expand Up @@ -156,7 +156,8 @@ def _get_exif_datetime(exif_dict: Dict[str, Any], key: str) -> Optional[datetime


def apply_lang_metadata(
elements: Iterable[Element],
# redundant hinting, but was raising linting error in CI
elements: Union[Iterable[Element], List[Element]],
languages: List[str],
detect_language_per_element: bool = False,
) -> Iterator[Element]:
Expand Down

0 comments on commit a87efd2

Please sign in to comment.