mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-26 02:07:22 +08:00
os.path.sep should always have a clear value
This commit is contained in:
1 parent
99008eef43
commit
81488bcd20
4 files changed
+17
-5
No files matched your search
@@ -789,3 +789,13 @@ class EnumInstance(LazyContextWrapper):
|
||||
))
|
||||
for f in self._get_wrapped_context().get_filters():
|
||||
yield f
|
||||
|
||||
|
||||
def tree_name_to_contexts(func):
|
||||
def wrapper(evaluator, context, tree_name):
|
||||
if tree_name.value == 'sep' and context.is_module() and context.py__name__() == 'os.path':
|
||||
return ContextSet({
|
||||
compiled.create_simple_object(evaluator, os.path.sep),
|
||||
})
|
||||
return func(evaluator, context, tree_name)
|
||||
return wrapper
|
||||
Reference in new issue
Block a user