mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Merge remote-tracking branch 'origin' into support-dataclass-transform
* origin: Don't remove `sys.path[0]`. perf: improve performance by replacing list to set Explicit sphinx config path
This commit is contained in:
@@ -10,6 +10,9 @@ python:
|
||||
submodules:
|
||||
include: all
|
||||
|
||||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
|
||||
@@ -3,10 +3,6 @@ import sys
|
||||
from importlib.abc import MetaPathFinder
|
||||
from importlib.machinery import PathFinder
|
||||
|
||||
# Remove the first entry, because it's simply a directory entry that equals
|
||||
# this directory.
|
||||
del sys.path[0]
|
||||
|
||||
|
||||
def _get_paths():
|
||||
# Get the path to jedi.
|
||||
|
||||
@@ -480,7 +480,7 @@ def _load_builtin_module(inference_state, import_names=None, sys_path=None):
|
||||
if sys_path is None:
|
||||
sys_path = inference_state.get_sys_path()
|
||||
if not project._load_unsafe_extensions:
|
||||
safe_paths = project._get_base_sys_path(inference_state)
|
||||
safe_paths = set(project._get_base_sys_path(inference_state))
|
||||
sys_path = [p for p in sys_path if p in safe_paths]
|
||||
|
||||
dotted_name = '.'.join(import_names)
|
||||
|
||||
Reference in New Issue
Block a user