mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
Fix type() usage check in validate-modules.
This avoids false positives when 'if' or 'or' are in a string preceding the use of type() on the same line.
This commit is contained in:
parent
43ae12757e
commit
46f9648aa1
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ from voluptuous.humanize import humanize_error
|
||||||
|
|
||||||
BLACKLIST_DIRS = frozenset(('.git', 'test', '.github', '.idea'))
|
BLACKLIST_DIRS = frozenset(('.git', 'test', '.github', '.idea'))
|
||||||
INDENT_REGEX = re.compile(r'([\t]*)')
|
INDENT_REGEX = re.compile(r'([\t]*)')
|
||||||
TYPE_REGEX = re.compile(r'.*(if|or)(\s+.*|\s+)(?<!_)(?<!str\()type\(.*')
|
TYPE_REGEX = re.compile(r'.*(if|or)(\s+[^"\']*|\s+)(?<!_)(?<!str\()type\(.*')
|
||||||
BLACKLIST_IMPORTS = {
|
BLACKLIST_IMPORTS = {
|
||||||
'requests': {
|
'requests': {
|
||||||
'new_only': True,
|
'new_only': True,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue