mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 23:04:48 +08:00
os.path.sep should always have a clear value
This commit is contained in:
@@ -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