mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-16 01:50:39 +00:00
fix linting
This commit is contained in:
parent
8834d1e1d8
commit
357606e1e9
@ -191,7 +191,7 @@ class Candidate:
|
||||
if sid:
|
||||
standard_id = f"[{sid}] "
|
||||
|
||||
return standard_id # noqa
|
||||
return standard_id
|
||||
|
||||
def __repr__(self):
|
||||
return f"{type(self).__name__} ({self.path})"
|
||||
|
@ -304,7 +304,7 @@ class StandardBase(metaclass=StandardExtendedMeta):
|
||||
return "\n".join([f"{self.candidate}:{error}" for error in self.errors])
|
||||
|
||||
|
||||
class StandardLoader():
|
||||
class StandardLoader:
|
||||
|
||||
def __init__(self, source):
|
||||
self.rules = []
|
||||
|
@ -209,11 +209,10 @@ def template(basedir, value, variables, fail_on_undefined=False, **kwargs):
|
||||
# Hack to skip the following exception when using to_json filter on a variable.
|
||||
# I guess the filter doesn't like empty vars...
|
||||
with suppress(AnsibleError, ValueError):
|
||||
value = ansible_template(
|
||||
return ansible_template(
|
||||
os.path.abspath(basedir), value, variables,
|
||||
**dict(kwargs, fail_on_undefined=fail_on_undefined)
|
||||
)
|
||||
return value
|
||||
|
||||
|
||||
def play_children(basedir, item, parent_type):
|
||||
@ -373,8 +372,7 @@ def rolename(filepath):
|
||||
if idx < 0:
|
||||
return ""
|
||||
role = filepath[idx + 6:]
|
||||
role = role[:role.find("/")]
|
||||
return role
|
||||
return role[:role.find("/")]
|
||||
|
||||
|
||||
def _kv_to_dict(v):
|
||||
|
@ -118,6 +118,7 @@ ignore = [
|
||||
"D203",
|
||||
"D212",
|
||||
"UP038",
|
||||
"RUF012",
|
||||
]
|
||||
line-length = 99
|
||||
select = [
|
||||
|
Loading…
Reference in New Issue
Block a user