ansible-test - Removed no-basestring sanity test

pull/82123/head
Matt Clay 1 year ago
parent c349b91af3
commit 6e15fb0ebf

@ -0,0 +1,3 @@
minor_changes:
- ansible-test - Removed the ``no-basestring`` sanity test.
The test is no longer necessary now that Python 3 is required.

@ -1,7 +0,0 @@
{
"extensions": [
".py"
],
"ignore_self": true,
"output": "path-line-column-message"
}

@ -1,21 +0,0 @@
"""Disallow use of basestring isinstance checks."""
from __future__ import annotations
import re
import sys
def main():
"""Main entry point."""
for path in sys.argv[1:] or sys.stdin.read().splitlines():
with open(path, 'r', encoding='utf-8') as path_fd:
for line, text in enumerate(path_fd.readlines()):
match = re.search(r'(isinstance.*basestring)', text)
if match:
print('%s:%d:%d: do not use `isinstance(s, basestring)`' % (
path, line + 1, match.start(1) + 1))
if __name__ == '__main__':
main()

@ -73,7 +73,6 @@ lib/ansible/module_utils/powershell/Ansible.ModuleUtils.Legacy.psm1 pslint:PSUse
lib/ansible/module_utils/powershell/Ansible.ModuleUtils.LinkUtil.psm1 pslint:PSUseApprovedVerbs
lib/ansible/module_utils/pycompat24.py no-get-exception
lib/ansible/module_utils/six/__init__.py empty-init # breaks namespacing, bundled, do not override
lib/ansible/module_utils/six/__init__.py no-basestring
lib/ansible/module_utils/six/__init__.py pylint:self-assigning-variable
lib/ansible/module_utils/six/__init__.py pylint:trailing-comma-tuple
lib/ansible/module_utils/six/__init__.py replace-urlopen

Loading…
Cancel
Save