(#11948) [linter] Add more checks to migrate import for tools

* [linter] Add more checks to migrate import for tools

* add link
This commit is contained in:
Daniel
2022-08-01 12:03:40 +02:00
committed by GitHub
parent 44ef91d968
commit f03c78ff14
2 changed files with 14 additions and 11 deletions

View File

@@ -16,8 +16,14 @@ def register(linter: PyLinter):
def transform_tools(module):
""" Transform import module """
if 'get' in module.locals:
del module.locals['get']
if 'cross_building' in module.locals:
del module.locals['cross_building']
if 'rmdir' in module.locals:
del module.locals['rmdir']
if 'Version' in module.locals:
del module.locals['Version']
astroid.MANAGER.register_transform(