mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-10-11 08:03:10 +00:00
feat: Final
Compatibility with Python 3.7 (#64)
This commit is contained in:
parent
300c564c62
commit
4f539dda44
@ -1,3 +1,7 @@
|
|||||||
|
## 0.2.4
|
||||||
|
|
||||||
|
* Add alternative way of importing `Final` to support google colab
|
||||||
|
|
||||||
## 0.2.3
|
## 0.2.3
|
||||||
|
|
||||||
* Add cleaning bricks for removing prefixes and postfixes
|
* Add cleaning bricks for removing prefixes and postfixes
|
||||||
|
@ -1 +1 @@
|
|||||||
__version__ = "0.2.3" # pragma: no cover
|
__version__ = "0.2.4" # pragma: no cover
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from typing import Final, List, Optional, Sequence, Tuple
|
from typing import List, Optional, Sequence, Tuple
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info < (3, 8):
|
||||||
|
from typing_extensions import Final
|
||||||
|
else:
|
||||||
|
from typing import Final
|
||||||
|
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from typing import Final
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info < (3, 8):
|
||||||
|
from typing_extensions import Final
|
||||||
|
else:
|
||||||
|
from typing import Final
|
||||||
|
|
||||||
DEFAULT_LOG_LEVEL: Final[str] = "WARNING"
|
DEFAULT_LOG_LEVEL: Final[str] = "WARNING"
|
||||||
|
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
from typing import Final
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info < (3, 8):
|
||||||
|
from typing_extensions import Final
|
||||||
|
else:
|
||||||
|
from typing import Final
|
||||||
|
|
||||||
from layoutparser.models.detectron2.layoutmodel import (
|
from layoutparser.models.detectron2.layoutmodel import (
|
||||||
is_detectron2_available,
|
is_detectron2_available,
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
"""parition.py implements logic for partining plain text documents into sections."""
|
"""parition.py implements logic for partining plain text documents into sections."""
|
||||||
from typing import Final, List, Optional
|
from typing import List, Optional
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info < (3, 8):
|
||||||
|
from typing_extensions import Final
|
||||||
|
else:
|
||||||
|
from typing import Final
|
||||||
|
|
||||||
from unstructured.cleaners.core import remove_punctuation
|
from unstructured.cleaners.core import remove_punctuation
|
||||||
from unstructured.nlp.patterns import UNICODE_BULLETS_RE
|
from unstructured.nlp.patterns import UNICODE_BULLETS_RE
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
from typing import Final, List
|
from typing import List
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info < (3, 8):
|
||||||
|
from typing_extensions import Final
|
||||||
|
else:
|
||||||
|
from typing import Final
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
UNICODE_BULLETS: Final[List[str]] = [
|
UNICODE_BULLETS: Final[List[str]] = [
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from typing import Final, List, Tuple
|
from typing import List, Tuple
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info < (3, 8):
|
||||||
|
from typing_extensions import Final
|
||||||
|
else:
|
||||||
|
from typing import Final
|
||||||
|
|
||||||
from nltk import (
|
from nltk import (
|
||||||
pos_tag as _pos_tag,
|
pos_tag as _pos_tag,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user