mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2026-01-06 12:21:30 +00:00
fix: Python 3.7 typing imports (#108)
Per issue #57 , fix typing imports in Python 3.7.
This commit is contained in:
parent
de4d0d42b1
commit
962c9dccca
@ -1,3 +1,7 @@
|
||||
## 0.3.4
|
||||
|
||||
* Python-3.7 compat
|
||||
|
||||
## 0.3.3
|
||||
|
||||
* Removes BasicConfig from logger configuration
|
||||
|
||||
@ -1 +1 @@
|
||||
__version__ = "0.3.3" # pragma: no cover
|
||||
__version__ = "0.3.4" # pragma: no cover
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
import email
|
||||
from typing import Dict, Final, IO, List, Optional
|
||||
import sys
|
||||
from typing import Dict, IO, List, Optional
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
from typing_extensions import Final
|
||||
else:
|
||||
from typing import Final
|
||||
|
||||
from unstructured.cleaners.core import replace_mime_encodings
|
||||
from unstructured.documents.elements import Element, Text
|
||||
|
||||
@ -1,18 +1,5 @@
|
||||
import requests # type: ignore
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
from typing_extensions import (
|
||||
List,
|
||||
Optional,
|
||||
Union,
|
||||
Tuple,
|
||||
Mapping,
|
||||
BinaryIO,
|
||||
) # pragma: no cover
|
||||
else:
|
||||
from typing import List, Optional, Union, Tuple, Mapping, BinaryIO # pragma: no cover
|
||||
from typing import BinaryIO, List, Optional, Union, Tuple, Mapping
|
||||
|
||||
from unstructured.documents.elements import Element
|
||||
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
"""partition.py implements logic for partitioning plain text documents into sections."""
|
||||
import sys
|
||||
|
||||
from typing import List, Optional
|
||||
|
||||
if sys.version_info < (3, 8):
|
||||
from typing_extensions import Final, List, Optional
|
||||
from typing_extensions import Final
|
||||
else:
|
||||
from typing import Final, List, Optional
|
||||
from typing import Final
|
||||
|
||||
from unstructured.cleaners.core import remove_punctuation
|
||||
from unstructured.nlp.patterns import UNICODE_BULLETS_RE
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user