chore: drop yapf and favor of the ruff formatter (#716)

This commit is contained in:
Robert Kaussow 2023-11-10 14:50:48 +01:00 committed by GitHub
parent 511728afdf
commit 8266f92b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 160 additions and 279 deletions

View File

@ -12,7 +12,7 @@ steps:
- git fetch --depth=2147483647 - git fetch --depth=2147483647
- pip install poetry poetry-dynamic-versioning -qq - pip install poetry poetry-dynamic-versioning -qq
- poetry install - poetry install
- poetry run yapf -dr ./${CI_REPO_NAME//-/} - poetry run ruff format --check --diff ./${CI_REPO_NAME//-/}
environment: environment:
PY_COLORS: "1" PY_COLORS: "1"

View File

@ -25,14 +25,14 @@ def main():
dest="rules.standards", dest="rules.standards",
metavar="RULES", metavar="RULES",
action="append", action="append",
help="directory of standard rules" help="directory of standard rules",
) )
parser.add_argument( parser.add_argument(
"-B", "-B",
"--no-buildin", "--no-buildin",
dest="rules.buildin", dest="rules.buildin",
action="store_false", action="store_false",
help="disables build-in standard rules" help="disables build-in standard rules",
) )
parser.add_argument( parser.add_argument(
"-s", "-s",
@ -40,7 +40,7 @@ def main():
dest="rules.filter", dest="rules.filter",
metavar="FILTER", metavar="FILTER",
action="append", action="append",
help="limit standards to given ID's" help="limit standards to given ID's",
) )
parser.add_argument( parser.add_argument(
"-x", "-x",
@ -48,7 +48,7 @@ def main():
dest="rules.exclude_filter", dest="rules.exclude_filter",
metavar="EXCLUDE_FILTER", metavar="EXCLUDE_FILTER",
action="append", action="append",
help="exclude standards by given ID's" help="exclude standards by given ID's",
) )
parser.add_argument( parser.add_argument(
"-v", dest="logging.level", action="append_const", const=-1, help="increase log level" "-v", dest="logging.level", action="append_const", const=-1, help="increase log level"
@ -85,7 +85,7 @@ def main():
else: else:
LOG.info(f"Couldn't classify file {filename}") LOG.info(f"Couldn't classify file {filename}")
errors = (sum(p.map(_review_wrapper, tasks))) errors = sum(p.map(_review_wrapper, tasks))
p.close() p.close()
p.join() p.join()

View File

@ -107,7 +107,7 @@ class Candidate:
"tag": "review", "tag": "review",
"standard": standard.description, "standard": standard.description,
"file": self.path, "file": self.path,
"passed": True "passed": True,
} }
if standard.sid and standard.sid.strip(): if standard.sid and standard.sid.strip():
@ -127,12 +127,12 @@ class Candidate:
if not standard.version: if not standard.version:
LOG.warning( LOG.warning(
f"{sid}Best practice '{description}' not met:\n{path}:{err}", f"{sid}Best practice '{description}' not met:\n{path}:{err}",
extra=flag_extra(err_labels) extra=flag_extra(err_labels),
) )
elif Version(standard.version) > Version(self.version): elif Version(standard.version) > Version(self.version):
LOG.warning( LOG.warning(
f"{sid}Future standard '{description}' not met:\n{path}:{err}", f"{sid}Future standard '{description}' not met:\n{path}:{err}",
extra=flag_extra(err_labels) extra=flag_extra(err_labels),
) )
else: else:
msg = f"{sid}Standard '{description}' not met:\n{path}:{err}" msg = f"{sid}Standard '{description}' not met:\n{path}:{err}"
@ -165,14 +165,16 @@ class Candidate:
return Meta(filename, settings, standards) return Meta(filename, settings, standards)
if parentdir in ["meta"] and "argument_specs" in basename: if parentdir in ["meta"] and "argument_specs" in basename:
return ArgumentSpecs(filename, settings, standards) return ArgumentSpecs(filename, settings, standards)
if ( if parentdir in [
parentdir in ["library", "lookup_plugins", "callback_plugins", "filter_plugins"] "library",
or filename.endswith(".py") "lookup_plugins",
): "callback_plugins",
"filter_plugins",
] or filename.endswith(".py"):
return Code(filename, settings, standards) return Code(filename, settings, standards)
if basename == "inventory" or basename == "hosts" or parentdir in ["inventories"]: if basename == "inventory" or basename == "hosts" or parentdir in ["inventories"]:
return Inventory(filename, settings, standards) return Inventory(filename, settings, standards)
if ("rolesfile" in basename or ("requirements" in basename and ext in ["yaml", "yml"])): if "rolesfile" in basename or ("requirements" in basename and ext in ["yaml", "yml"]):
return Rolesfile(filename, settings, standards) return Rolesfile(filename, settings, standards)
if "Makefile" in basename: if "Makefile" in basename:
return Makefile(filename, settings, standards) return Makefile(filename, settings, standards)

View File

@ -26,7 +26,7 @@ def strtobool(value):
"f": False, "f": False,
"false": False, "false": False,
"off": False, "off": False,
"0": False "0": False,
} }
try: try:
@ -40,7 +40,6 @@ def to_bool(string):
def _should_do_markup(): def _should_do_markup():
py_colors = os.environ.get("PY_COLORS", None) py_colors = os.environ.get("PY_COLORS", None)
if py_colors is not None: if py_colors is not None:
return to_bool(py_colors) return to_bool(py_colors)

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckBecomeUser(StandardBase): class CheckBecomeUser(StandardBase):
sid = "ANSIBLE0015" sid = "ANSIBLE0015"
description = "Become should be combined with become_user" description = "Become should be combined with become_user"
helptext = "the task has `become` enabled but `become_user` is missing" helptext = "the task has `become` enabled but `become_user` is missing"

View File

@ -5,7 +5,6 @@ from ansiblelater.utils import count_spaces
class CheckBracesSpaces(StandardBase): class CheckBracesSpaces(StandardBase):
sid = "ANSIBLE0004" sid = "ANSIBLE0004"
description = "YAML should use consistent number of spaces around variables" description = "YAML should use consistent number of spaces around variables"
helptext = "no suitable numbers of spaces (min: {min} max: {max})" helptext = "no suitable numbers of spaces (min: {min} max: {max})"
@ -41,7 +40,7 @@ class CheckBracesSpaces(StandardBase):
i, i,
self.helptext.format( self.helptext.format(
min=conf["min-spaces-inside"], max=conf["max-spaces-inside"] min=conf["min-spaces-inside"], max=conf["max-spaces-inside"]
) ),
) )
) )
return self.Result(candidate.path, errors) return self.Result(candidate.path, errors)

View File

@ -22,7 +22,6 @@ from ansiblelater.standard import StandardBase
class CheckChangedInWhen(StandardBase): class CheckChangedInWhen(StandardBase):
sid = "ANSIBLE0026" sid = "ANSIBLE0026"
description = "Use handlers instead of `when: changed`" description = "Use handlers instead of `when: changed`"
helptext = "tasks using `when: result.changed` setting are effectively acting as a handler" helptext = "tasks using `when: result.changed` setting are effectively acting as a handler"
@ -58,7 +57,8 @@ class CheckChangedInWhen(StandardBase):
return False return False
return any( return any(
changed in item for changed in [ changed in item
for changed in [
".changed", ".changed",
"|changed", "|changed",
'["changed"]', '["changed"]',

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckCommandHasChanges(StandardBase): class CheckCommandHasChanges(StandardBase):
sid = "ANSIBLE0011" sid = "ANSIBLE0011"
description = "Commands should be idempotent" description = "Commands should be idempotent"
helptext = ( helptext = (
@ -19,9 +18,11 @@ class CheckCommandHasChanges(StandardBase):
if not errors: if not errors:
for task in tasks: for task in tasks:
if task["action"]["__ansible_module__"] in commands and ( if task["action"]["__ansible_module__"] in commands and (
"changed_when" not in task and "when" not in task "changed_when" not in task
and "when" not in task
and "when" not in task.get("__ansible_action_meta__", []) and "when" not in task.get("__ansible_action_meta__", [])
and "creates" not in task["action"] and "removes" not in task["action"] and "creates" not in task["action"]
and "removes" not in task["action"]
): ):
errors.append(self.Error(task["__line__"], self.helptext)) errors.append(self.Error(task["__line__"], self.helptext))

View File

@ -24,7 +24,6 @@ from ansiblelater.standard import StandardBase
class CheckCommandInsteadOfArgument(StandardBase): class CheckCommandInsteadOfArgument(StandardBase):
sid = "ANSIBLE0017" sid = "ANSIBLE0017"
description = "Commands should not be used in place of module arguments" description = "Commands should not be used in place of module arguments"
helptext = "{exec} used in place of file modules argument {arg}" helptext = "{exec} used in place of file modules argument {arg}"
@ -41,7 +40,7 @@ class CheckCommandInsteadOfArgument(StandardBase):
"ln": "state=link", "ln": "state=link",
"mkdir": "state=directory", "mkdir": "state=directory",
"rmdir": "state=absent", "rmdir": "state=absent",
"rm": "state=absent" "rm": "state=absent",
} }
if not errors: if not errors:
@ -51,13 +50,14 @@ class CheckCommandInsteadOfArgument(StandardBase):
executable = os.path.basename(first_cmd_arg) executable = os.path.basename(first_cmd_arg)
if ( if (
first_cmd_arg and executable in arguments first_cmd_arg
and executable in arguments
and task["action"].get("warn", True) and task["action"].get("warn", True)
): ):
errors.append( errors.append(
self.Error( self.Error(
task["__line__"], task["__line__"],
self.helptext.format(exec=executable, arg=arguments[executable]) self.helptext.format(exec=executable, arg=arguments[executable]),
) )
) )

View File

@ -4,7 +4,6 @@ from ansiblelater.standard import StandardBase
class CheckCommandInsteadOfModule(StandardBase): class CheckCommandInsteadOfModule(StandardBase):
sid = "ANSIBLE0008" sid = "ANSIBLE0008"
description = "Commands should not be used in place of modules" description = "Commands should not be used in place of modules"
helptext = "{exec} command used in place of {module} module" helptext = "{exec} command used in place of {module} module"
@ -31,7 +30,7 @@ class CheckCommandInsteadOfModule(StandardBase):
"rsync": "synchronize", "rsync": "synchronize",
"supervisorctl": "supervisorctl", "supervisorctl": "supervisorctl",
"systemctl": "systemd", "systemctl": "systemd",
"sed": "template or lineinfile" "sed": "template or lineinfile",
} }
if not errors: if not errors:
@ -42,14 +41,16 @@ class CheckCommandInsteadOfModule(StandardBase):
cmd = cmd = self.get_safe_cmd(task) cmd = cmd = self.get_safe_cmd(task)
if ( if (
first_cmd_arg and executable in modules first_cmd_arg
and task["action"].get("warn", True) and "register" not in task and executable in modules
and task["action"].get("warn", True)
and "register" not in task
and not any(ch in cmd for ch in self.SHELL_PIPE_CHARS) and not any(ch in cmd for ch in self.SHELL_PIPE_CHARS)
): ):
errors.append( errors.append(
self.Error( self.Error(
task["__line__"], task["__line__"],
self.helptext.format(exec=executable, module=modules[executable]) self.helptext.format(exec=executable, module=modules[executable]),
) )
) )

View File

@ -5,10 +5,9 @@ from ansiblelater.standard import StandardBase
class CheckCompareToEmptyString(StandardBase): class CheckCompareToEmptyString(StandardBase):
sid = "ANSIBLE0012" sid = "ANSIBLE0012"
description = "Don't compare to empty string \"\"" description = 'Don\'t compare to empty string ""'
helptext = ("use `when: var` rather than `when: var !=` (or conversely `when: not var`)") helptext = "use `when: var` rather than `when: var !=` (or conversely `when: not var`)"
version = "0.1" version = "0.1"
types = ["playbook", "task", "handler", "template"] types = ["playbook", "task", "handler", "template"]

View File

@ -5,10 +5,9 @@ from ansiblelater.standard import StandardBase
class CheckCompareToLiteralBool(StandardBase): class CheckCompareToLiteralBool(StandardBase):
sid = "ANSIBLE0013" sid = "ANSIBLE0013"
description = "Don't compare to True or False" description = "Don't compare to True or False"
helptext = ("use `when: var` rather than `when: var == True` (or conversely `when: not var`)") helptext = "use `when: var` rather than `when: var == True` (or conversely `when: not var`)"
version = "0.1" version = "0.1"
types = ["playbook", "task", "handler"] types = ["playbook", "task", "handler"]

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckDeprecated(StandardBase): class CheckDeprecated(StandardBase):
sid = "ANSIBLE9999" sid = "ANSIBLE9999"
description = "Deprecated features should not be used" description = "Deprecated features should not be used"
helptext = "'{old}' is deprecated and should not be used anymore. Use '{new}' instead." helptext = "'{old}' is deprecated and should not be used anymore. Use '{new}' instead."
@ -20,7 +19,7 @@ class CheckDeprecated(StandardBase):
task["__line__"], task["__line__"],
self.helptext.format( self.helptext.format(
old="skip_ansible_lint", new="skip_ansible_later" old="skip_ansible_lint", new="skip_ansible_later"
) ),
) )
) )
return self.Result(candidate.path, errors) return self.Result(candidate.path, errors)

View File

@ -25,7 +25,6 @@ from ansiblelater.utils import has_glob, has_jinja
class CheckDeprecatedBareVars(StandardBase): class CheckDeprecatedBareVars(StandardBase):
sid = "ANSIBLE0027" sid = "ANSIBLE0027"
description = "Deprecated bare variables in loops must not be used" description = "Deprecated bare variables in loops must not be used"
helptext = ( helptext = (
@ -84,6 +83,6 @@ class CheckDeprecatedBareVars(StandardBase):
self.errors.append( self.errors.append(
self.Error( self.Error(
task["__line__"], task["__line__"],
self.helptext.format(barevar=varstring, loop_type=loop_type) self.helptext.format(barevar=varstring, loop_type=loop_type),
) )
) )

View File

@ -23,7 +23,6 @@ from ansiblelater.standard import StandardBase
class CheckFilePermissionMissing(StandardBase): class CheckFilePermissionMissing(StandardBase):
sid = "ANSIBLE0018" sid = "ANSIBLE0018"
description = "File permissions unset or incorrect" description = "File permissions unset or incorrect"
helptext = ( helptext = (
@ -67,8 +66,7 @@ class CheckFilePermissionMissing(StandardBase):
mode = task["action"].get("mode", None) mode = task["action"].get("mode", None)
state = task["action"].get("state", "file") state = task["action"].get("state", "file")
if module not in self._modules and \ if module not in self._modules and module not in self._create_modules:
module not in self._create_modules:
return False return False
if mode == "preserve" and module not in self._preserve_modules: if mode == "preserve" and module not in self._preserve_modules:

View File

@ -22,7 +22,6 @@ from ansiblelater.standard import StandardBase
class CheckFilePermissionOctal(StandardBase): class CheckFilePermissionOctal(StandardBase):
sid = "ANSIBLE0019" sid = "ANSIBLE0019"
description = "Octal file permissions must contain leading zero or be a string" description = "Octal file permissions must contain leading zero or be a string"
helptext = "numeric file permissions without leading zero can behave in unexpected ways" helptext = "numeric file permissions without leading zero can behave in unexpected ways"
@ -32,8 +31,15 @@ class CheckFilePermissionOctal(StandardBase):
def check(self, candidate, settings): def check(self, candidate, settings):
tasks, errors = self.get_normalized_tasks(candidate, settings) tasks, errors = self.get_normalized_tasks(candidate, settings)
modules = [ modules = [
"assemble", "copy", "file", "ini_file", "lineinfile", "replace", "synchronize", "assemble",
"template", "unarchive" "copy",
"file",
"ini_file",
"lineinfile",
"replace",
"synchronize",
"template",
"unarchive",
] ]
if not errors: if not errors:
@ -48,20 +54,24 @@ class CheckFilePermissionOctal(StandardBase):
@staticmethod @staticmethod
def _is_invalid_permission(mode): def _is_invalid_permission(mode):
other_write_without_read = ( other_write_without_read = (
mode % 8 and mode % 8 < 4 and not (mode % 8 == 1 and (mode >> 6) % 2 == 1) mode % 8 and mode % 8 < 4 and not (mode % 8 == 1 and (mode >> 6) % 2 == 1)
) )
group_write_without_read = ((mode >> 3) % 8 and (mode >> 3) % 8 < 4 group_write_without_read = (
and not ((mode >> 3) % 8 == 1 and (mode >> 6) % 2 == 1)) (mode >> 3) % 8
user_write_without_read = ((mode >> 6) % 8 and (mode >> 6) % 8 < 4 and (mode >> 3) % 8 < 4
and (mode >> 6) % 8 != 1) and not ((mode >> 3) % 8 == 1 and (mode >> 6) % 2 == 1)
)
user_write_without_read = (mode >> 6) % 8 and (mode >> 6) % 8 < 4 and (mode >> 6) % 8 != 1
other_more_generous_than_group = mode % 8 > (mode >> 3) % 8 other_more_generous_than_group = mode % 8 > (mode >> 3) % 8
other_more_generous_than_user = mode % 8 > (mode >> 6) % 8 other_more_generous_than_user = mode % 8 > (mode >> 6) % 8
group_more_generous_than_user = (mode >> 3) % 8 > (mode >> 6) % 8 group_more_generous_than_user = (mode >> 3) % 8 > (mode >> 6) % 8
return bool( return bool(
other_write_without_read or group_write_without_read or user_write_without_read other_write_without_read
or other_more_generous_than_group or other_more_generous_than_user or group_write_without_read
or user_write_without_read
or other_more_generous_than_group
or other_more_generous_than_user
or group_more_generous_than_user or group_more_generous_than_user
) )

View File

@ -4,7 +4,6 @@ from ansiblelater.standard import StandardBase
class CheckFilterSeparation(StandardBase): class CheckFilterSeparation(StandardBase):
sid = "ANSIBLE0016" sid = "ANSIBLE0016"
description = "Jinja2 filters should be separated with spaces" description = "Jinja2 filters should be separated with spaces"
helptext = "no suitable numbers of spaces (required: 1)" helptext = "no suitable numbers of spaces (required: 1)"

View File

@ -22,7 +22,6 @@ from ansiblelater.standard import StandardBase
class CheckGitHasVersion(StandardBase): class CheckGitHasVersion(StandardBase):
sid = "ANSIBLE0020" sid = "ANSIBLE0020"
description = "Git checkouts should use explicit version" description = "Git checkouts should use explicit version"
helptext = "git checkouts should point to an explicit commit or tag, not `latest`" helptext = "git checkouts should point to an explicit commit or tag, not `latest`"

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckInstallUseLatest(StandardBase): class CheckInstallUseLatest(StandardBase):
sid = "ANSIBLE0009" sid = "ANSIBLE0009"
description = "Package installs should use present, not latest" description = "Package installs should use present, not latest"
helptext = "package installs should use `state=present` with or without a version" helptext = "package installs should use `state=present` with or without a version"
@ -12,10 +11,32 @@ class CheckInstallUseLatest(StandardBase):
def check(self, candidate, settings): def check(self, candidate, settings):
tasks, errors = self.get_normalized_tasks(candidate, settings) tasks, errors = self.get_normalized_tasks(candidate, settings)
package_managers = [ package_managers = [
"yum", "apt", "dnf", "homebrew", "pacman", "openbsd_package", "pkg5", "portage", "yum",
"pkgutil", "slackpkg", "swdepot", "zypper", "bundler", "pip", "pear", "npm", "yarn", "apt",
"gem", "easy_install", "bower", "package", "apk", "openbsd_pkg", "pkgng", "sorcery", "dnf",
"xbps" "homebrew",
"pacman",
"openbsd_package",
"pkg5",
"portage",
"pkgutil",
"slackpkg",
"swdepot",
"zypper",
"bundler",
"pip",
"pear",
"npm",
"yarn",
"gem",
"easy_install",
"bower",
"package",
"apk",
"openbsd_pkg",
"pkgng",
"sorcery",
"xbps",
] ]
if not errors: if not errors:

View File

@ -4,7 +4,6 @@ from ansiblelater.standard import StandardBase
class CheckLiteralBoolFormat(StandardBase): class CheckLiteralBoolFormat(StandardBase):
sid = "ANSIBLE0014" sid = "ANSIBLE0014"
description = "Literal bools should be consistent" description = "Literal bools should be consistent"
helptext = "literal bools should be written as `{bools}`" helptext = "literal bools should be written as `{bools}`"

View File

@ -4,10 +4,9 @@ from ansiblelater.standard import StandardBase
class CheckLocalAction(StandardBase): class CheckLocalAction(StandardBase):
sid = "ANSIBLE0024" sid = "ANSIBLE0024"
description = "Don't use local_action" description = "Don't use local_action"
helptext = ("`delegate_to: localhost` should be used instead of `local_action`") helptext = "`delegate_to: localhost` should be used instead of `local_action`"
version = "0.2" version = "0.2"
types = ["playbook", "task", "handler"] types = ["playbook", "task", "handler"]

View File

@ -5,7 +5,6 @@ from ansiblelater.standard import StandardBase
class CheckMetaChangeFromDefault(StandardBase): class CheckMetaChangeFromDefault(StandardBase):
sid = "ANSIBLE0021" sid = "ANSIBLE0021"
description = "Roles meta/main.yml default values should be changed" description = "Roles meta/main.yml default values should be changed"
helptext = "meta/main.yml default values should be changed for: `{field}`" helptext = "meta/main.yml default values should be changed for: `{field}`"

View File

@ -4,7 +4,6 @@ from ansiblelater.standard import StandardBase
class CheckMetaMain(StandardBase): class CheckMetaMain(StandardBase):
sid = "ANSIBLE0002" sid = "ANSIBLE0002"
description = "Roles must contain suitable meta/main.yml" description = "Roles must contain suitable meta/main.yml"
helptext = "file should contain `{key}` key" helptext = "file should contain `{key}` key"
@ -16,8 +15,8 @@ class CheckMetaMain(StandardBase):
keys = ["author", "description", "min_ansible_version", "platforms"] keys = ["author", "description", "min_ansible_version", "platforms"]
if not errors: if not errors:
has_galaxy_info = (isinstance(content, dict) and "galaxy_info" in content) has_galaxy_info = isinstance(content, dict) and "galaxy_info" in content
has_dependencies = (isinstance(content, dict) and "dependencies" in content) has_dependencies = isinstance(content, dict) and "dependencies" in content
if not has_galaxy_info: if not has_galaxy_info:
errors.append(self.Error(None, self.helptext.format(key="galaxy_info"))) errors.append(self.Error(None, self.helptext.format(key="galaxy_info")))

View File

@ -4,7 +4,6 @@ from ansiblelater.standard import StandardBase
class CheckNameFormat(StandardBase): class CheckNameFormat(StandardBase):
sid = "ANSIBLE0007" sid = "ANSIBLE0007"
description = "Name of tasks and handlers must be formatted" description = "Name of tasks and handlers must be formatted"
helptext = "name '{name}' should start with uppercase" helptext = "name '{name}' should start with uppercase"
@ -19,7 +18,7 @@ class CheckNameFormat(StandardBase):
for task in tasks: for task in tasks:
if "name" in task: if "name" in task:
namelines[task["name"]].append(task["__line__"]) namelines[task["name"]].append(task["__line__"])
for (name, lines) in namelines.items(): for name, lines in namelines.items():
if name and not name[0].isupper(): if name and not name[0].isupper():
errors.append(self.Error(lines[-1], self.helptext.format(name=name))) errors.append(self.Error(lines[-1], self.helptext.format(name=name)))

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckNamedTask(StandardBase): class CheckNamedTask(StandardBase):
sid = "ANSIBLE0006" sid = "ANSIBLE0006"
description = "Tasks and handlers must be named" description = "Tasks and handlers must be named"
helptext = "module '{module}' used without or empty `name` attribute" helptext = "module '{module}' used without or empty `name` attribute"

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckNativeYaml(StandardBase): class CheckNativeYaml(StandardBase):
sid = "LINT0008" sid = "LINT0008"
description = "Use YAML format for tasks and handlers rather than key=value" description = "Use YAML format for tasks and handlers rather than key=value"
helptext = "task arguments appear to be in key value rather than YAML format" helptext = "task arguments appear to be in key value rather than YAML format"

View File

@ -25,7 +25,6 @@ from ansiblelater.standard import StandardBase
class CheckNestedJinja(StandardBase): class CheckNestedJinja(StandardBase):
sid = "ANSIBLE0023" sid = "ANSIBLE0023"
description = "Don't use nested Jinja2 pattern" description = "Don't use nested Jinja2 pattern"
helptext = ( helptext = (

View File

@ -4,7 +4,6 @@ from ansiblelater.standard import StandardBase
class CheckRelativeRolePaths(StandardBase): class CheckRelativeRolePaths(StandardBase):
sid = "ANSIBLE0025" sid = "ANSIBLE0025"
description = "Don't use a relative path in a role" description = "Don't use a relative path in a role"
helptext = "`copy` and `template` modules don't need relative path for `src`" helptext = "`copy` and `template` modules don't need relative path for `src`"

View File

@ -4,7 +4,6 @@ from ansiblelater.standard import StandardBase
class CheckScmInSrc(StandardBase): class CheckScmInSrc(StandardBase):
sid = "ANSIBLE0005" sid = "ANSIBLE0005"
description = "Use `scm:` key rather than `src: scm+url`" description = "Use `scm:` key rather than `src: scm+url`"
helptext = "usage of `src: scm+url` not recommended" helptext = "usage of `src: scm+url` not recommended"
@ -17,7 +16,8 @@ class CheckScmInSrc(StandardBase):
if not errors: if not errors:
for role in roles: for role in roles:
if ( if (
isinstance(role, AnsibleMapping) and bool(role.get("src")) isinstance(role, AnsibleMapping)
and bool(role.get("src"))
and "+" in role.get("src") and "+" in role.get("src")
): ):
errors.append(self.Error(role["__line__"], self.helptext)) errors.append(self.Error(role["__line__"], self.helptext))

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckShellInsteadCommand(StandardBase): class CheckShellInsteadCommand(StandardBase):
sid = "ANSIBLE0010" sid = "ANSIBLE0010"
description = "Shell should only be used when essential" description = "Shell should only be used when essential"
helptext = "shell should only be used when piping, redirecting or chaining commands" helptext = "shell should only be used when piping, redirecting or chaining commands"

View File

@ -5,7 +5,6 @@ from ansiblelater.standard import StandardBase
class CheckTaskSeparation(StandardBase): class CheckTaskSeparation(StandardBase):
sid = "ANSIBLE0001" sid = "ANSIBLE0001"
description = "Single tasks should be separated by empty line" description = "Single tasks should be separated by empty line"
helptext = "missing task separation (required: 1 empty line)" helptext = "missing task separation (required: 1 empty line)"

View File

@ -4,7 +4,6 @@ from ansiblelater.standard import StandardBase
class CheckUniqueNamedTask(StandardBase): class CheckUniqueNamedTask(StandardBase):
sid = "ANSIBLE0003" sid = "ANSIBLE0003"
description = "Tasks and handlers must be uniquely named within a single file" description = "Tasks and handlers must be uniquely named within a single file"
helptext = "name '{name}' appears multiple times" helptext = "name '{name}' appears multiple times"
@ -20,7 +19,7 @@ class CheckUniqueNamedTask(StandardBase):
for task in tasks: for task in tasks:
if "name" in task: if "name" in task:
namelines[task["name"]].append(task["__line__"]) namelines[task["name"]].append(task["__line__"])
for (name, lines) in namelines.items(): for name, lines in namelines.items():
if name and len(lines) > 1: if name and len(lines) > 1:
errors.append(self.Error(lines[-1], self.helptext.format(name=name))) errors.append(self.Error(lines[-1], self.helptext.format(name=name)))

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckVersion(StandardBase): class CheckVersion(StandardBase):
sid = "ANSIBLE9998" sid = "ANSIBLE9998"
description = "Standards version should be pinned" description = "Standards version should be pinned"
helptext = "Standards version not set. Using latest standards version {version}" helptext = "Standards version not set. Using latest standards version {version}"

View File

@ -2,12 +2,10 @@ from ansiblelater.standard import StandardBase
class CheckWhenFormat(StandardBase): class CheckWhenFormat(StandardBase):
sid = "ANSIBLE0022" sid = "ANSIBLE0022"
description = "Don't use Jinja2 in when" description = "Don't use Jinja2 in when"
helptext = ( helptext = (
"`when` is a raw Jinja2 expression, redundant {{ }} " "`when` is a raw Jinja2 expression, redundant {{ }} " "should be removed from variable(s)"
"should be removed from variable(s)"
) )
version = "0.2" version = "0.2"
types = ["playbook", "task", "handler"] types = ["playbook", "task", "handler"]

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckYamlColons(StandardBase): class CheckYamlColons(StandardBase):
sid = "LINT0005" sid = "LINT0005"
description = "YAML should use consistent number of spaces around colons" description = "YAML should use consistent number of spaces around colons"
version = "0.1" version = "0.1"

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckYamlDocumentEnd(StandardBase): class CheckYamlDocumentEnd(StandardBase):
sid = "LINT0009" sid = "LINT0009"
description = "YAML should contain document end marker" description = "YAML should contain document end marker"
version = "0.1" version = "0.1"

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckYamlDocumentStart(StandardBase): class CheckYamlDocumentStart(StandardBase):
sid = "LINT0004" sid = "LINT0004"
description = "YAML should contain document start marker" description = "YAML should contain document start marker"
version = "0.1" version = "0.1"

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckYamlEmptyLines(StandardBase): class CheckYamlEmptyLines(StandardBase):
sid = "LINT0001" sid = "LINT0001"
description = "YAML should not contain unnecessarily empty lines" description = "YAML should not contain unnecessarily empty lines"
version = "0.1" version = "0.1"

View File

@ -4,7 +4,6 @@ from ansiblelater.standard import StandardBase
class CheckYamlFile(StandardBase): class CheckYamlFile(StandardBase):
sid = "LINT0006" sid = "LINT0006"
description = "Roles file should be in yaml format" description = "Roles file should be in yaml format"
helptext = "file does not have a .yml extension" helptext = "file does not have a .yml extension"

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckYamlHasContent(StandardBase): class CheckYamlHasContent(StandardBase):
sid = "LINT0007" sid = "LINT0007"
description = "Files should contain useful content" description = "Files should contain useful content"
helptext = "the file appears to have no useful content" helptext = "the file appears to have no useful content"

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckYamlHyphens(StandardBase): class CheckYamlHyphens(StandardBase):
sid = "LINT0003" sid = "LINT0003"
description = "YAML should use consistent number of spaces after hyphens" description = "YAML should use consistent number of spaces after hyphens"
version = "0.1" version = "0.1"

View File

@ -2,7 +2,6 @@ from ansiblelater.standard import StandardBase
class CheckYamlIndent(StandardBase): class CheckYamlIndent(StandardBase):
sid = "LINT0002" sid = "LINT0002"
description = "YAML should not contain unnecessarily empty lines" description = "YAML should not contain unnecessarily empty lines"
version = "0.1" version = "0.1"

View File

@ -128,11 +128,11 @@ class Settings:
], ],
"ignore_dotfiles": True, "ignore_dotfiles": True,
"exclude_files": [], "exclude_files": [],
"version": "" "version": "",
}, },
"logging": { "logging": {
"level": "WARNING", "level": "WARNING",
"json": False "json": False,
}, },
"ansible": { "ansible": {
"custom_modules": [], "custom_modules": [],
@ -169,17 +169,17 @@ class Settings:
"indent-sequences": True, "indent-sequences": True,
}, },
"hyphens": { "hyphens": {
"max-spaces-after": 1 "max-spaces-after": 1,
}, },
"document-start": { "document-start": {
"present": True "present": True,
}, },
"document-end": { "document-end": {
"present": True "present": True,
}, },
"colons": { "colons": {
"max-spaces-before": 0, "max-spaces-before": 0,
"max-spaces-after": 1 "max-spaces-after": 1,
}, },
}, },
} }

View File

@ -28,7 +28,6 @@ from ansiblelater.utils.yamlhelper import (
class StandardMeta(type): class StandardMeta(type):
def __call__(cls, *args): def __call__(cls, *args):
mcls = type.__call__(cls, *args) mcls = type.__call__(cls, *args)
mcls.sid = cls.sid mcls.sid = cls.sid
@ -44,7 +43,6 @@ class StandardExtendedMeta(StandardMeta, ABCMeta):
class StandardBase(metaclass=StandardExtendedMeta): class StandardBase(metaclass=StandardExtendedMeta):
SHELL_PIPE_CHARS = "&|<>;$\n*[]{}?" SHELL_PIPE_CHARS = "&|<>;$\n*[]{}?"
@property @property
@ -279,7 +277,7 @@ class StandardBase(metaclass=StandardExtendedMeta):
self.lineno = lineno self.lineno = lineno
self.message = message self.message = message
self.kwargs = kwargs self.kwargs = kwargs
for (key, value) in kwargs.items(): for key, value in kwargs.items():
setattr(self, key, value) setattr(self, key, value)
def __repr__(self): def __repr__(self):
@ -289,7 +287,7 @@ class StandardBase(metaclass=StandardExtendedMeta):
def to_dict(self): def to_dict(self):
result = {"lineno": self.lineno, "message": self.message} result = {"lineno": self.lineno, "message": self.message}
for (key, value) in self.kwargs.items(): for key, value in self.kwargs.items():
result[key] = value result[key] = value
return result return result
@ -305,7 +303,6 @@ class StandardBase(metaclass=StandardExtendedMeta):
class StandardLoader: class StandardLoader:
def __init__(self, source): def __init__(self, source):
self.rules = [] self.rules = []
@ -333,12 +330,15 @@ class StandardLoader:
self.validate() self.validate()
def _is_plugin(self, obj): def _is_plugin(self, obj):
return inspect.isclass(obj) and issubclass( return (
obj, StandardBase inspect.isclass(obj)
) and obj is not StandardBase and not None and issubclass(obj, StandardBase)
and obj is not StandardBase
and not None
)
def validate(self): def validate(self):
normalized_std = (list(toolz.remove(lambda x: x.sid == "", self.rules))) normalized_std = list(toolz.remove(lambda x: x.sid == "", self.rules))
unique_std = len(list(toolz.unique(normalized_std, key=lambda x: x.sid))) unique_std = len(list(toolz.unique(normalized_std, key=lambda x: x.sid)))
all_std = len(normalized_std) all_std = len(normalized_std)
if all_std != unique_std: if all_std != unique_std:

View File

@ -32,12 +32,13 @@ def count_spaces(c_string):
break break
trailing_spaces += 1 trailing_spaces += 1
return ((leading_spaces, trailing_spaces)) return (leading_spaces, trailing_spaces)
def standards_latest(standards): def standards_latest(standards):
return max([standard.version for standard in standards if standard.version] or ["0.1"], return max(
key=Version) [standard.version for standard in standards if standard.version] or ["0.1"], key=Version
)
def lines_ranges(lines_spec): def lines_ranges(lines_spec):
@ -82,11 +83,11 @@ def open_file(filename, mode="r"):
def add_dict_branch(tree, vector, value): def add_dict_branch(tree, vector, value):
key = vector[0] key = vector[0]
tree[key] = value \ tree[key] = (
if len(vector) == 1 \ value
else add_dict_branch(tree[key] if key in tree else {}, if len(vector) == 1
vector[1:], else add_dict_branch(tree[key] if key in tree else {}, vector[1:], value)
value) )
return tree return tree

View File

@ -68,6 +68,7 @@ try:
from ansible.plugins import module_loader from ansible.plugins import module_loader
except ImportError: except ImportError:
from ansible.plugins.loader import init_plugin_loader, module_loader from ansible.plugins.loader import init_plugin_loader, module_loader
init_plugin_loader() init_plugin_loader()
LINE_NUMBER_KEY = "__line__" LINE_NUMBER_KEY = "__line__"
@ -190,8 +191,10 @@ def template(basedir, value, variables, fail_on_undefined=False, **kwargs):
# I guess the filter doesn't like empty vars... # I guess the filter doesn't like empty vars...
with suppress(AnsibleError, ValueError): with suppress(AnsibleError, ValueError):
return ansible_template( return ansible_template(
os.path.abspath(basedir), value, variables, os.path.abspath(basedir),
**dict(kwargs, fail_on_undefined=fail_on_undefined) value,
variables,
**dict(kwargs, fail_on_undefined=fail_on_undefined),
) )
@ -214,8 +217,9 @@ def play_children(basedir, item, parent_type):
if k in delegate_map and v: if k in delegate_map and v:
v = template( v = template(
os.path.abspath(basedir), os.path.abspath(basedir),
v, {"playbook_dir": os.path.abspath(basedir)}, v,
fail_on_undefined=False {"playbook_dir": os.path.abspath(basedir)},
fail_on_undefined=False,
) )
return delegate_map[k](basedir, k, v, parent_type) return delegate_map[k](basedir, k, v, parent_type)
return [] return []
@ -246,18 +250,20 @@ def _taskshandlers_children(basedir, k, v, parent_type):
results.extend( results.extend(
_roles_children( _roles_children(
basedir, basedir,
k, [th["import_role"].get("name")], k,
[th["import_role"].get("name")],
parent_type, parent_type,
main=th["import_role"].get("tasks_from", "main") main=th["import_role"].get("tasks_from", "main"),
) )
) )
elif "include_role" in th: elif "include_role" in th:
results.extend( results.extend(
_roles_children( _roles_children(
basedir, basedir,
k, [th["include_role"].get("name")], k,
[th["include_role"].get("name")],
parent_type, parent_type,
main=th["include_role"].get("tasks_from", "main") main=th["include_role"].get("tasks_from", "main"),
) )
) )
elif "block" in th: elif "block" in th:
@ -309,7 +315,7 @@ def _rolepath(basedir, role):
path_dwim(basedir, role), path_dwim(basedir, role),
# if included from roles/[role]/meta/main.yml # if included from roles/[role]/meta/main.yml
path_dwim(basedir, os.path.join("..", "..", "..", "roles", role)), path_dwim(basedir, os.path.join("..", "..", "..", "roles", role)),
path_dwim(basedir, os.path.join("..", "..", role)) path_dwim(basedir, os.path.join("..", "..", role)),
] ]
if constants.DEFAULT_ROLES_PATH: if constants.DEFAULT_ROLES_PATH:
@ -351,13 +357,13 @@ def rolename(filepath):
idx = filepath.find("roles/") idx = filepath.find("roles/")
if idx < 0: if idx < 0:
return "" return ""
role = filepath[idx + 6:] role = filepath[idx + 6 :]
return role[:role.find("/")] return role[: role.find("/")]
def _kv_to_dict(v): def _kv_to_dict(v):
(command, args, kwargs) = tokenize(v) (command, args, kwargs) = tokenize(v)
return (dict(__ansible_module__=command, __ansible_arguments__=args, **kwargs)) return dict(__ansible_module__=command, __ansible_arguments__=args, **kwargs)
def normalize_task(task, filename, custom_modules=None): def normalize_task(task, filename, custom_modules=None):
@ -368,7 +374,7 @@ def normalize_task(task, filename, custom_modules=None):
ansible_action_type = task.get("__ansible_action_type__", "task") ansible_action_type = task.get("__ansible_action_type__", "task")
if "__ansible_action_type__" in task: if "__ansible_action_type__" in task:
del (task["__ansible_action_type__"]) del task["__ansible_action_type__"]
# temp. extract metadata # temp. extract metadata
ansible_meta = {} ansible_meta = {}
@ -395,9 +401,9 @@ def normalize_task(task, filename, custom_modules=None):
# denormalize shell -> command conversion # denormalize shell -> command conversion
if "_uses_shell" in arguments: if "_uses_shell" in arguments:
action = "shell" action = "shell"
del (arguments["_uses_shell"]) del arguments["_uses_shell"]
for (k, v) in list(task.items()): for k, v in list(task.items()):
if k in ("action", "local_action", "args", "delegate_to") or k == action: if k in ("action", "local_action", "args", "delegate_to") or k == action:
# we don"t want to re-assign these values, which were # we don"t want to re-assign these values, which were
# determined by the ModuleArgsParser() above # determined by the ModuleArgsParser() above
@ -409,7 +415,7 @@ def normalize_task(task, filename, custom_modules=None):
if "_raw_params" in arguments: if "_raw_params" in arguments:
normalized["action"]["__ansible_arguments__"] = arguments["_raw_params"].strip().split() normalized["action"]["__ansible_arguments__"] = arguments["_raw_params"].strip().split()
del (arguments["_raw_params"]) del arguments["_raw_params"]
else: else:
normalized["action"]["__ansible_arguments__"] = [] normalized["action"]["__ansible_arguments__"] = []
normalized["action"].update(arguments) normalized["action"].update(arguments)
@ -418,7 +424,7 @@ def normalize_task(task, filename, custom_modules=None):
normalized["__ansible_action_type__"] = ansible_action_type normalized["__ansible_action_type__"] = ansible_action_type
# add back extracted metadata # add back extracted metadata
for (k, v) in ansible_meta.items(): for k, v in ansible_meta.items():
if v: if v:
normalized[k] = v normalized[k] = v
@ -448,10 +454,14 @@ def task_to_str(task):
if name: if name:
return name return name
action = task.get("action") action = task.get("action")
args = " ".join([ args = " ".join(
f"{k}={v}" for (k, v) in action.items() [
if k not in ["__ansible_module__", "__ansible_arguments__"] f"{k}={v}"
] + action.get("__ansible_arguments__")) for (k, v) in action.items()
if k not in ["__ansible_module__", "__ansible_arguments__"]
]
+ action.get("__ansible_arguments__")
)
return "{} {}".format(action["__ansible_module__"], args) return "{} {}".format(action["__ansible_module__"], args)
@ -523,7 +533,7 @@ def parse_yaml_linenumbers(data, filename):
yaml.constructor.ConstructorError, yaml.constructor.ConstructorError,
) as e: ) as e:
raise LaterError("syntax error", e) from e raise LaterError("syntax error", e) from e
except (yaml.composer.ComposerError) as e: except yaml.composer.ComposerError as e:
e.problem = f"{e.context} {e.problem}" e.problem = f"{e.context} {e.problem}"
raise LaterError("syntax error", e) from e raise LaterError("syntax error", e) from e
return data return data

130
poetry.lock generated
View File

@ -1,10 +1,9 @@
# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
[[package]] [[package]]
name = "ansible" name = "ansible"
version = "8.6.1" version = "8.6.1"
description = "Radically simple IT automation" description = "Radically simple IT automation"
category = "main"
optional = true optional = true
python-versions = ">=3.9" python-versions = ">=3.9"
files = [ files = [
@ -19,7 +18,6 @@ ansible-core = ">=2.15.6,<2.16.0"
name = "ansible-core" name = "ansible-core"
version = "2.15.6" version = "2.15.6"
description = "Radically simple IT automation" description = "Radically simple IT automation"
category = "main"
optional = true optional = true
python-versions = ">=3.9" python-versions = ">=3.9"
files = [ files = [
@ -39,7 +37,6 @@ resolvelib = ">=0.5.3,<1.1.0"
name = "anyconfig" name = "anyconfig"
version = "0.13.0" version = "0.13.0"
description = "Library provides common APIs to load and dump configuration files in various formats" description = "Library provides common APIs to load and dump configuration files in various formats"
category = "main"
optional = false optional = false
python-versions = "*" python-versions = "*"
files = [ files = [
@ -61,7 +58,6 @@ yaml = ["pyyaml"]
name = "appdirs" name = "appdirs"
version = "1.4.4" version = "1.4.4"
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
category = "main"
optional = false optional = false
python-versions = "*" python-versions = "*"
files = [ files = [
@ -73,7 +69,6 @@ files = [
name = "attrs" name = "attrs"
version = "23.1.0" version = "23.1.0"
description = "Classes Without Boilerplate" description = "Classes Without Boilerplate"
category = "main"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -92,7 +87,6 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte
name = "cffi" name = "cffi"
version = "1.16.0" version = "1.16.0"
description = "Foreign Function Interface for Python calling C code." description = "Foreign Function Interface for Python calling C code."
category = "main"
optional = true optional = true
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
@ -157,7 +151,6 @@ pycparser = "*"
name = "colorama" name = "colorama"
version = "0.4.6" version = "0.4.6"
description = "Cross-platform colored terminal text." description = "Cross-platform colored terminal text."
category = "main"
optional = false optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
files = [ files = [
@ -169,7 +162,6 @@ files = [
name = "coverage" name = "coverage"
version = "7.3.2" version = "7.3.2"
description = "Code coverage measurement for Python" description = "Code coverage measurement for Python"
category = "dev"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
@ -237,7 +229,6 @@ toml = ["tomli"]
name = "cryptography" name = "cryptography"
version = "41.0.5" version = "41.0.5"
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
category = "main"
optional = true optional = true
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -283,7 +274,6 @@ test-randomorder = ["pytest-randomly"]
name = "exceptiongroup" name = "exceptiongroup"
version = "1.1.3" version = "1.1.3"
description = "Backport of PEP 654 (exception groups)" description = "Backport of PEP 654 (exception groups)"
category = "dev"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -294,31 +284,10 @@ files = [
[package.extras] [package.extras]
test = ["pytest (>=6)"] test = ["pytest (>=6)"]
[[package]]
name = "importlib-metadata"
version = "6.8.0"
description = "Read metadata from Python packages"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
{file = "importlib_metadata-6.8.0-py3-none-any.whl", hash = "sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb"},
{file = "importlib_metadata-6.8.0.tar.gz", hash = "sha256:dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743"},
]
[package.dependencies]
zipp = ">=0.5"
[package.extras]
docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"]
perf = ["ipython"]
testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"]
[[package]] [[package]]
name = "importlib-resources" name = "importlib-resources"
version = "5.0.7" version = "5.0.7"
description = "Read resources from Python packages" description = "Read resources from Python packages"
category = "main"
optional = true optional = true
python-versions = ">=3.6" python-versions = ">=3.6"
files = [ files = [
@ -334,7 +303,6 @@ testing = ["pytest (>=3.5,!=3.7.3)", "pytest-black (>=0.3.7)", "pytest-checkdocs
name = "iniconfig" name = "iniconfig"
version = "2.0.0" version = "2.0.0"
description = "brain-dead simple config-ini parsing" description = "brain-dead simple config-ini parsing"
category = "dev"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -346,7 +314,6 @@ files = [
name = "jinja2" name = "jinja2"
version = "3.1.2" version = "3.1.2"
description = "A very fast and expressive template engine." description = "A very fast and expressive template engine."
category = "main"
optional = true optional = true
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -364,7 +331,6 @@ i18n = ["Babel (>=2.7)"]
name = "jsonschema" name = "jsonschema"
version = "4.19.2" version = "4.19.2"
description = "An implementation of JSON Schema validation for Python" description = "An implementation of JSON Schema validation for Python"
category = "main"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
@ -386,7 +352,6 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-
name = "jsonschema-specifications" name = "jsonschema-specifications"
version = "2023.7.1" version = "2023.7.1"
description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry"
category = "main"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
@ -401,7 +366,6 @@ referencing = ">=0.28.0"
name = "markupsafe" name = "markupsafe"
version = "2.1.3" version = "2.1.3"
description = "Safely add untrusted strings to HTML/XML markup." description = "Safely add untrusted strings to HTML/XML markup."
category = "main"
optional = true optional = true
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -425,16 +389,6 @@ files = [
{file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"},
{file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"},
{file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"},
{file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"},
{file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"},
{file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"},
{file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"},
{file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"},
{file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"},
{file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"},
{file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"},
{file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"},
{file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"},
{file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"},
{file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"},
{file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"},
@ -471,7 +425,6 @@ files = [
name = "nested-lookup" name = "nested-lookup"
version = "0.2.25" version = "0.2.25"
description = "Python functions for working with deeply nested documents (lists and dicts)" description = "Python functions for working with deeply nested documents (lists and dicts)"
category = "main"
optional = false optional = false
python-versions = "*" python-versions = "*"
files = [ files = [
@ -485,7 +438,6 @@ six = "*"
name = "packaging" name = "packaging"
version = "23.2" version = "23.2"
description = "Core utilities for Python packages" description = "Core utilities for Python packages"
category = "main"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -497,7 +449,6 @@ files = [
name = "pathspec" name = "pathspec"
version = "0.11.2" version = "0.11.2"
description = "Utility library for gitignore style pattern matching of file paths." description = "Utility library for gitignore style pattern matching of file paths."
category = "main"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -505,27 +456,10 @@ files = [
{file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"}, {file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"},
] ]
[[package]]
name = "platformdirs"
version = "3.11.0"
description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
{file = "platformdirs-3.11.0-py3-none-any.whl", hash = "sha256:e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e"},
{file = "platformdirs-3.11.0.tar.gz", hash = "sha256:cf8ee52a3afdb965072dcc652433e0c7e3e40cf5ea1477cd4b3b1d2eb75495b3"},
]
[package.extras]
docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"]
test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"]
[[package]] [[package]]
name = "pluggy" name = "pluggy"
version = "1.3.0" version = "1.3.0"
description = "plugin and hook calling mechanisms for python" description = "plugin and hook calling mechanisms for python"
category = "dev"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
@ -541,7 +475,6 @@ testing = ["pytest", "pytest-benchmark"]
name = "pycparser" name = "pycparser"
version = "2.21" version = "2.21"
description = "C parser in Python" description = "C parser in Python"
category = "main"
optional = true optional = true
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [ files = [
@ -553,7 +486,6 @@ files = [
name = "pytest" name = "pytest"
version = "7.4.3" version = "7.4.3"
description = "pytest: simple powerful testing with Python" description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -576,7 +508,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no
name = "pytest-cov" name = "pytest-cov"
version = "4.1.0" version = "4.1.0"
description = "Pytest plugin for measuring coverage." description = "Pytest plugin for measuring coverage."
category = "dev"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -595,7 +526,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale
name = "pytest-mock" name = "pytest-mock"
version = "3.12.0" version = "3.12.0"
description = "Thin-wrapper around the mock package for easier use with pytest" description = "Thin-wrapper around the mock package for easier use with pytest"
category = "dev"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
@ -613,7 +543,6 @@ dev = ["pre-commit", "pytest-asyncio", "tox"]
name = "python-json-logger" name = "python-json-logger"
version = "2.0.7" version = "2.0.7"
description = "A python library adding a json log formatter" description = "A python library adding a json log formatter"
category = "main"
optional = false optional = false
python-versions = ">=3.6" python-versions = ">=3.6"
files = [ files = [
@ -625,7 +554,6 @@ files = [
name = "pyyaml" name = "pyyaml"
version = "6.0.1" version = "6.0.1"
description = "YAML parser and emitter for Python" description = "YAML parser and emitter for Python"
category = "main"
optional = false optional = false
python-versions = ">=3.6" python-versions = ">=3.6"
files = [ files = [
@ -634,7 +562,6 @@ files = [
{file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"},
{file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"},
{file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"},
{file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"},
{file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"},
{file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"},
{file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"},
@ -642,15 +569,8 @@ files = [
{file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"},
{file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"},
{file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"},
{file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"},
{file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"},
{file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"},
{file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"},
{file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"},
{file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"},
{file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"},
{file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"},
{file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"},
{file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"},
{file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"},
{file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"},
@ -667,7 +587,6 @@ files = [
{file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"},
{file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"},
{file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"},
{file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"},
{file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"},
{file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"},
{file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"},
@ -675,7 +594,6 @@ files = [
{file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"},
{file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"},
{file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"},
{file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"},
{file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"},
{file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"},
{file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"},
@ -685,7 +603,6 @@ files = [
name = "referencing" name = "referencing"
version = "0.30.2" version = "0.30.2"
description = "JSON Referencing + Python" description = "JSON Referencing + Python"
category = "main"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
@ -701,7 +618,6 @@ rpds-py = ">=0.7.0"
name = "resolvelib" name = "resolvelib"
version = "1.0.1" version = "1.0.1"
description = "Resolve abstract dependencies into concrete ones" description = "Resolve abstract dependencies into concrete ones"
category = "main"
optional = true optional = true
python-versions = "*" python-versions = "*"
files = [ files = [
@ -719,7 +635,6 @@ test = ["commentjson", "packaging", "pytest"]
name = "rpds-py" name = "rpds-py"
version = "0.12.0" version = "0.12.0"
description = "Python bindings to Rust's persistent data structures (rpds)" description = "Python bindings to Rust's persistent data structures (rpds)"
category = "main"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
@ -828,7 +743,6 @@ files = [
name = "ruff" name = "ruff"
version = "0.1.4" version = "0.1.4"
description = "An extremely fast Python linter and code formatter, written in Rust." description = "An extremely fast Python linter and code formatter, written in Rust."
category = "dev"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -855,7 +769,6 @@ files = [
name = "setuptools" name = "setuptools"
version = "68.2.2" version = "68.2.2"
description = "Easily download, build, install, upgrade, and uninstall Python packages" description = "Easily download, build, install, upgrade, and uninstall Python packages"
category = "main"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
@ -872,7 +785,6 @@ testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jar
name = "six" name = "six"
version = "1.16.0" version = "1.16.0"
description = "Python 2 and 3 compatibility utilities" description = "Python 2 and 3 compatibility utilities"
category = "main"
optional = false optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
files = [ files = [
@ -884,7 +796,6 @@ files = [
name = "toml" name = "toml"
version = "0.10.2" version = "0.10.2"
description = "Python Library for Tom's Obvious, Minimal Language" description = "Python Library for Tom's Obvious, Minimal Language"
category = "dev"
optional = false optional = false
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
files = [ files = [
@ -896,7 +807,6 @@ files = [
name = "tomli" name = "tomli"
version = "2.0.1" version = "2.0.1"
description = "A lil' TOML parser" description = "A lil' TOML parser"
category = "dev"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -908,7 +818,6 @@ files = [
name = "toolz" name = "toolz"
version = "0.12.0" version = "0.12.0"
description = "List processing tools and functional utilities" description = "List processing tools and functional utilities"
category = "main"
optional = false optional = false
python-versions = ">=3.5" python-versions = ">=3.5"
files = [ files = [
@ -920,7 +829,6 @@ files = [
name = "unidiff" name = "unidiff"
version = "0.7.5" version = "0.7.5"
description = "Unified diff parsing/metadata extraction library." description = "Unified diff parsing/metadata extraction library."
category = "main"
optional = false optional = false
python-versions = "*" python-versions = "*"
files = [ files = [
@ -932,7 +840,6 @@ files = [
name = "yamllint" name = "yamllint"
version = "1.32.0" version = "1.32.0"
description = "A linter for YAML files." description = "A linter for YAML files."
category = "main"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
@ -947,39 +854,6 @@ pyyaml = "*"
[package.extras] [package.extras]
dev = ["doc8", "flake8", "flake8-import-order", "rstcheck[sphinx]", "sphinx"] dev = ["doc8", "flake8", "flake8-import-order", "rstcheck[sphinx]", "sphinx"]
[[package]]
name = "yapf"
version = "0.40.2"
description = "A formatter for Python code"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
{file = "yapf-0.40.2-py3-none-any.whl", hash = "sha256:adc8b5dd02c0143108878c499284205adb258aad6db6634e5b869e7ee2bd548b"},
{file = "yapf-0.40.2.tar.gz", hash = "sha256:4dab8a5ed7134e26d57c1647c7483afb3f136878b579062b786c9ba16b94637b"},
]
[package.dependencies]
importlib-metadata = ">=6.6.0"
platformdirs = ">=3.5.1"
tomli = ">=2.0.1"
[[package]]
name = "zipp"
version = "3.17.0"
description = "Backport of pathlib-compatible object wrapper for zip files"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
{file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"},
{file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"},
]
[package.extras]
docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"]
testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"]
[extras] [extras]
ansible = ["ansible"] ansible = ["ansible"]
ansible-core = ["ansible-core"] ansible-core = ["ansible-core"]
@ -987,4 +861,4 @@ ansible-core = ["ansible-core"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.9.0" python-versions = "^3.9.0"
content-hash = "99bcf83eefed726262c88b008d7764f1008d1bebb9de08ccb83695d6ee78ec3c" content-hash = "1057a6f30f9b26d870a62f5c915c38e4ac248a26ed85c456b69fea9bc182cc57"

View File

@ -62,7 +62,6 @@ pytest = "7.4.3"
pytest-mock = "3.12.0" pytest-mock = "3.12.0"
pytest-cov = "4.1.0" pytest-cov = "4.1.0"
toml = "0.10.2" toml = "0.10.2"
yapf = "0.40.2"
[tool.poetry-dynamic-versioning] [tool.poetry-dynamic-versioning]
enable = true enable = true
@ -97,6 +96,10 @@ exclude = [
".eggs", ".eggs",
"env*", "env*",
] ]
line-length = 99
indent-width = 4
# Explanation of errors # Explanation of errors
# #
# D100: Missing docstring in public module # D100: Missing docstring in public module
@ -121,7 +124,6 @@ ignore = [
"UP038", "UP038",
"RUF012", "RUF012",
] ]
line-length = 99
select = [ select = [
"D", "D",
"E", "E",
@ -144,14 +146,7 @@ select = [
"RUF", "RUF",
] ]
[tool.ruff.flake8-quotes] [tool.ruff.format]
inline-quotes = "double" quote-style = "double"
indent-style = "space"
[tool.yapf] line-ending = "lf"
based_on_style = "google"
column_limit = 99
dedent_closing_brackets = true
coalesce_brackets = true
split_before_logical_operator = true
indent_dictionary_value = true
allow_split_before_dict_value = false