mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Remove tab check from validate-modules.
It is redundant with the pycodestyle W191 "indentation contains tabs" check.
This commit is contained in:
parent
db195831fd
commit
8d39515914
2 changed files with 0 additions and 15 deletions
|
@ -121,7 +121,6 @@ Errors
|
||||||
--------- -------------------
|
--------- -------------------
|
||||||
**4xx** **Syntax**
|
**4xx** **Syntax**
|
||||||
401 Python ``SyntaxError`` while parsing module
|
401 Python ``SyntaxError`` while parsing module
|
||||||
402 Indentation contains tabs
|
|
||||||
403 Type comparison using ``type()`` found. Use ``isinstance()`` instead
|
403 Type comparison using ``type()`` found. Use ``isinstance()`` instead
|
||||||
..
|
..
|
||||||
--------- -------------------
|
--------- -------------------
|
||||||
|
|
|
@ -396,19 +396,6 @@ class ModuleValidator(Validator):
|
||||||
'https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#copyright'
|
'https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#copyright'
|
||||||
)
|
)
|
||||||
|
|
||||||
def _check_for_tabs(self):
|
|
||||||
for line_no, line in enumerate(self.text.splitlines()):
|
|
||||||
indent = INDENT_REGEX.search(line)
|
|
||||||
if indent and '\t' in line:
|
|
||||||
index = line.index('\t')
|
|
||||||
self.reporter.error(
|
|
||||||
path=self.object_path,
|
|
||||||
code=402,
|
|
||||||
msg='indentation contains tabs',
|
|
||||||
line=line_no + 1,
|
|
||||||
column=index
|
|
||||||
)
|
|
||||||
|
|
||||||
def _find_blacklist_imports(self):
|
def _find_blacklist_imports(self):
|
||||||
for child in self.ast.body:
|
for child in self.ast.body:
|
||||||
names = []
|
names = []
|
||||||
|
@ -1358,7 +1345,6 @@ class ModuleValidator(Validator):
|
||||||
main = self._find_main_call()
|
main = self._find_main_call()
|
||||||
self._find_module_utils(main)
|
self._find_module_utils(main)
|
||||||
self._find_has_import()
|
self._find_has_import()
|
||||||
self._check_for_tabs()
|
|
||||||
first_callable = self._get_first_callable()
|
first_callable = self._get_first_callable()
|
||||||
self._ensure_imports_below_docs(doc_info, first_callable)
|
self._ensure_imports_below_docs(doc_info, first_callable)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue