mirror of
https://github.com/zerwes/ansible-fqcn-converter.git
synced 2025-02-25 18:55:30 -06:00
fixed warn condition and linted Dumper
This commit is contained in:
parent
bb250ba85f
commit
40a757e6ad
@ -35,9 +35,10 @@ def isexcluded(path, _exclude_paths):
|
||||
fnmatch.fnmatch(ppath, ep)
|
||||
for ep in _exclude_paths
|
||||
)
|
||||
class Dumper(yaml.Dumper):
|
||||
def increase_indent(self, flow=False, *args, **kwargs):
|
||||
return super().increase_indent(flow=flow, indentless=False)
|
||||
class Dumper(yaml.Dumper): # pylint: disable=too-many-ancestors
|
||||
"""https://github.com/yaml/pyyaml/issues/234"""
|
||||
def increase_indent(self, flow=False, *dargs): # pylint: disable=keyword-arg-before-vararg
|
||||
return super().increase_indent(dargs, indentless=False)
|
||||
|
||||
basepath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
@ -262,7 +263,7 @@ for f in parsefiles:
|
||||
print('.', file=sys.stderr, end='', flush=True)
|
||||
else:
|
||||
print('*', file=sys.stderr, end='', flush=True)
|
||||
if len(fqcndict[fqcnmodule]) > 0:
|
||||
if len(fqcndict[fqcnmodule]) > 1:
|
||||
warnings.append(
|
||||
'alternative replacement of %s : %s' %
|
||||
(fqcnmodule, ' | '.join(fqcndict[fqcnmodule]),)
|
||||
|
Loading…
Reference in New Issue
Block a user