Add docstring to is_import_exception
Clarify what is_import_exception does. Leave the name as is_import_exception and no is_import_whitelisted because import-exceptions is part of the API for hacking (used in the hacking section of tox.ini). Change-Id: Ib36d84078ecfcdbcb62137b40ab7426738e56a45
This commit is contained in:
parent
6c851bdf2f
commit
a74b044719
@ -74,6 +74,10 @@ IMPORT_EXCEPTIONS += DEFAULT_IMPORT_EXCEPTIONS
|
||||
|
||||
|
||||
def is_import_exception(mod):
|
||||
"""Check module name to see if import has been whitelisted.
|
||||
|
||||
Import based rules should not run on any whitelisted module
|
||||
"""
|
||||
return (mod in IMPORT_EXCEPTIONS or
|
||||
any(mod.startswith(m + '.') for m in IMPORT_EXCEPTIONS))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user