mirror of
https://github.com/conan-io/conan-center-index.git
synced 2025-08-15 11:08:38 +00:00
(#12254) linter v2 - Request migration of conans.errors
to conan.errors
* linter v2 - errors should be imported from module conan * Add docs * revert - test linter * fix typo * touch
This commit is contained in:
@@ -25,7 +25,17 @@ def transform_tools(module):
|
||||
if 'Version' in module.locals:
|
||||
del module.locals['Version']
|
||||
|
||||
def transform_errors(module):
|
||||
if 'ConanInvalidConfiguration' in module.locals:
|
||||
del module.locals['ConanInvalidConfiguration']
|
||||
if 'ConanException' in module.locals:
|
||||
del module.locals['ConanException']
|
||||
|
||||
|
||||
astroid.MANAGER.register_transform(
|
||||
astroid.Module, transform_tools,
|
||||
lambda node: node.qname() == "conans.tools")
|
||||
|
||||
astroid.MANAGER.register_transform(
|
||||
astroid.Module, transform_errors,
|
||||
lambda node: node.qname() == "conans.errors")
|
||||
|
Reference in New Issue
Block a user