mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Remove compatibility for IsADirectoryError PermissionError NotADirectoryError
This commit is contained in:
@@ -216,23 +216,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
from itertools import izip_longest as zip_longest # Python 2 # noqa: F401
|
from itertools import izip_longest as zip_longest # Python 2 # noqa: F401
|
||||||
|
|
||||||
try:
|
|
||||||
IsADirectoryError = IsADirectoryError
|
|
||||||
except NameError:
|
|
||||||
IsADirectoryError = IOError
|
|
||||||
|
|
||||||
try:
|
|
||||||
PermissionError = PermissionError
|
|
||||||
except NameError:
|
|
||||||
PermissionError = IOError
|
|
||||||
|
|
||||||
try:
|
|
||||||
NotADirectoryError = NotADirectoryError
|
|
||||||
except NameError:
|
|
||||||
class NotADirectoryError(Exception):
|
|
||||||
# Don't implement this for Python 2 anymore.
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def utf8_repr(func):
|
def utf8_repr(func):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ import errno
|
|||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from jedi._compatibility import PermissionError, \
|
|
||||||
IsADirectoryError, NotADirectoryError
|
|
||||||
from jedi import debug
|
from jedi import debug
|
||||||
from jedi.api.environment import get_cached_default_environment, create_environment
|
from jedi.api.environment import get_cached_default_environment, create_environment
|
||||||
from jedi.api.exceptions import WrongVersion
|
from jedi.api.exceptions import WrongVersion
|
||||||
|
|||||||
Reference in New Issue
Block a user