mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-04 13:40:34 +03:00
No need for Literal
compat, since we only support >= 3.8
This commit is contained in:
parent
57203fa0fc
commit
7b689bde44
|
@ -23,11 +23,6 @@ try:
|
|||
except ImportError:
|
||||
cupy = None
|
||||
|
||||
if sys.version_info[:2] >= (3, 8): # Python 3.8+
|
||||
from typing import Literal, Protocol, runtime_checkable
|
||||
else:
|
||||
from typing_extensions import Literal, Protocol, runtime_checkable # noqa: F401
|
||||
|
||||
from thinc.api import Optimizer # noqa: F401
|
||||
|
||||
pickle = pickle
|
||||
|
|
|
@ -999,7 +999,6 @@ class Errors(metaclass=ErrorsWithCodes):
|
|||
E4011 = ("Server error ({status_code}), couldn't fetch {url}")
|
||||
|
||||
|
||||
|
||||
RENAMED_LANGUAGE_CODES = {"xx": "mul", "is": "isl"}
|
||||
|
||||
# fmt: on
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
from typing import List, Optional, cast
|
||||
from typing import List, Literal, Optional
|
||||
|
||||
from thinc.api import Linear, Model, chain, list2array, use_ops, zero_init
|
||||
from thinc.types import Floats2d
|
||||
|
||||
from ...compat import Literal
|
||||
from ...errors import Errors
|
||||
from ...tokens import Doc
|
||||
from ...util import registry
|
||||
|
|
Loading…
Reference in New Issue
Block a user