mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
PY-48506 os.PathLike is only available in Python 3.6 and above
GitOrigin-RevId: 23e5e900cc9a9faa32703cbd8ea4b19141dd86c2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
92711923e2
commit
b30c8b2915
@@ -3,7 +3,8 @@ import os
|
||||
import sys
|
||||
import traceback
|
||||
from _pydev_imps._pydev_saved_modules import threading
|
||||
from _pydevd_bundle.pydevd_constants import get_global_debugger, IS_WINDOWS, IS_MACOS, IS_JYTHON, IS_PY36_OR_LESSER, IS_PY38_OR_GREATER, \
|
||||
from _pydevd_bundle.pydevd_constants import get_global_debugger, IS_WINDOWS, IS_MACOS, \
|
||||
IS_JYTHON, IS_PY36_OR_LESSER, IS_PY36_OR_GREATER, IS_PY38_OR_GREATER, \
|
||||
get_current_thread_id
|
||||
from _pydev_bundle import pydev_log
|
||||
|
||||
@@ -108,7 +109,7 @@ def starts_with_python_shebang(path):
|
||||
|
||||
|
||||
def is_python(path):
|
||||
if isinstance(path, os.PathLike):
|
||||
if IS_PY36_OR_GREATER and isinstance(path, os.PathLike):
|
||||
path = path.__fspath__()
|
||||
if path.endswith("'") or path.endswith('"'):
|
||||
path = path[1:len(path) - 1]
|
||||
|
||||
Reference in New Issue
Block a user