mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-06 13:23:14 +00:00
Merge pull request #471 from rjeffman/tools_flake8_bugbear
Tools flake8 bugbear
This commit is contained in:
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -30,4 +30,4 @@ jobs:
|
||||
uses: ibiqlik/action-yamllint@v1
|
||||
|
||||
- name: Run Python linters
|
||||
uses: rjeffman/python-lint-action@master
|
||||
uses: rjeffman/python-lint-action@v2
|
||||
|
||||
@@ -1375,10 +1375,9 @@ def define_commands_for_present_state(module, zone_name, entry, res_find):
|
||||
# remove record from args, as it will not be used again.
|
||||
del args[record]
|
||||
else:
|
||||
for f in part_fields:
|
||||
_args = {k: args[k] for k in part_fields}
|
||||
_args['idnsname'] = name
|
||||
_commands.append([zone_name, 'dnsrecord_add', _args])
|
||||
_args = {k: args[k] for k in part_fields if k in args}
|
||||
_args['idnsname'] = name
|
||||
_commands.append([zone_name, 'dnsrecord_add', _args])
|
||||
# clean used fields from args
|
||||
for f in part_fields:
|
||||
if f in args:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
-r requirements-tests.txt
|
||||
ipdb
|
||||
pre-commit
|
||||
flake8-bugbear
|
||||
|
||||
@@ -169,7 +169,7 @@ def list_test_yaml(dir_path):
|
||||
`test_` and the extension is `.yml`.
|
||||
"""
|
||||
yamls = []
|
||||
for root, dirs, files in os.walk(dir_path):
|
||||
for root, _dirs, files in os.walk(dir_path):
|
||||
for yaml_name in files:
|
||||
if yaml_name.startswith("test_") and yaml_name.endswith(".yml"):
|
||||
test_yaml_path = os.path.join(root, yaml_name)
|
||||
|
||||
Reference in New Issue
Block a user