diff options
author | Matt Clay <matt@mystile.com> | 2022-03-07 12:15:18 -0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2022-03-07 13:24:39 -0800 |
commit | 4867ac217ba0164b433d0927488d153e116d175d (patch) | |
tree | 3c1b5e3bf313109e373154feed9a5a8c1d5c81ba /lib/ansible/utils | |
parent | 8063643b4cec51a72377da5f3fa354d3ff9e737a (diff) | |
download | ansible-4867ac217ba0164b433d0927488d153e116d175d.tar.gz |
Code cleanup for type hinting issues.
Diffstat (limited to 'lib/ansible/utils')
-rw-r--r-- | lib/ansible/utils/collection_loader/_collection_finder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/utils/collection_loader/_collection_finder.py b/lib/ansible/utils/collection_loader/_collection_finder.py index 7d54fcf7ed..875cbe9066 100644 --- a/lib/ansible/utils/collection_loader/_collection_finder.py +++ b/lib/ansible/utils/collection_loader/_collection_finder.py @@ -71,10 +71,10 @@ try: # NOTE: py3/py2 compat # py2 mypy can't deal with try/excepts is_python_identifier = str.isidentifier # type: ignore[attr-defined] except AttributeError: # Python 2 - def is_python_identifier(tested_str): # type: (str) -> bool + def is_python_identifier(self): # type: (str) -> bool """Determine whether the given string is a Python identifier.""" # Ref: https://stackoverflow.com/a/55802320/595220 - return bool(re.match(_VALID_IDENTIFIER_STRING_REGEX, tested_str)) + return bool(re.match(_VALID_IDENTIFIER_STRING_REGEX, self)) PB_EXTENSIONS = ('.yml', '.yaml') |