mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Enable pylint rules and fix exposed bugs. (#47219)
* Resolve invalid-unary-operand-type. * Resolve raising-format-tuple. * Resolve stop-iteration-return. * Use disable comment instead of fixing logic. The affected line in _find_address_range will only fail on Python 3.7 and later if the function is called with an empty address list. As an internal method it is never called in this way, making it a non-issue for use via public methods. Using a comment to disable the rule in favor of an ignore.txt entry since there are no plans to change the logic in the code itself. This will also prevent any potential future issues being added in other parts of the code when updating it based on upstream changes.
This commit is contained in:
parent
cd7232eeb7
commit
c24c19594e
8 changed files with 9 additions and 10 deletions
|
@ -184,7 +184,6 @@ class SourcesList(object):
|
|||
for n, valid, enabled, source, comment in sources:
|
||||
if valid:
|
||||
yield file, n, enabled, source, comment
|
||||
raise StopIteration
|
||||
|
||||
def _expand_path(self, filename):
|
||||
if '/' in filename:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue