mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
If the file already has relative imports, next one inserted via completion/auto-import has a chance to be relative. For that new import has to have the number of dots <= than the max of the file's relative import and a number provided by a registry value in 'python.relative.import.depth', that is 3 by default. It also has to be located in the same root package, since python doesn't allow relative imports to step outside of it. The file must not have "if __name__ == '__main__'" in it, since it suggests that it is intended to be runnable and relative imports will not work. Relative import statements can also be updated with new import elements, if the user's codestyle allows it. GitOrigin-RevId: 766a03e2252bb1f8193a2156831cc8fdf0a7aced
2 lines
24 B
Python
2 lines
24 B
Python
def bar_func():
|
|
pass |