1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-15 08:21:31 +00:00

Reformat everything.

This commit is contained in:
Felix Fontein 2025-11-01 12:08:41 +01:00
parent 3f2213791a
commit 340ff8586d
1008 changed files with 61301 additions and 58309 deletions

View file

@ -217,12 +217,8 @@ class Pnpm:
if not os.path.isdir(self.path):
self.module.fail_json(msg=f"Path {self.path} is not a directory")
if not self.alias_name_ver and not os.path.isfile(
os.path.join(self.path, "package.json")
):
self.module.fail_json(
msg="package.json does not exist in provided path"
)
if not self.alias_name_ver and not os.path.isfile(os.path.join(self.path, "package.json")):
self.module.fail_json(msg="package.json does not exist in provided path")
cwd = self.path
@ -247,9 +243,7 @@ class Pnpm:
data = json.loads(out)
except Exception as e:
self.module.fail_json(
msg=f"Failed to parse pnpm output with error {e}"
)
self.module.fail_json(msg=f"Failed to parse pnpm output with error {e}")
if "error" in data:
return True
@ -324,9 +318,7 @@ class Pnpm:
data = json.loads(out)
except Exception as e:
self.module.fail_json(
msg=f"Failed to parse pnpm output with error {e}"
)
self.module.fail_json(msg=f"Failed to parse pnpm output with error {e}")
return data.keys()
@ -377,17 +369,13 @@ def main():
module.fail_json(msg="Cannot specify path when doing global installation")
if globally and (production or dev or optional):
module.fail_json(
msg="Options production, dev, and optional is meaningless when installing packages globally"
)
module.fail_json(msg="Options production, dev, and optional is meaningless when installing packages globally")
if name is not None and path is not None and globally:
module.fail_json(msg="path should not be mentioned when installing globally")
if production and dev and optional:
module.fail_json(
msg="Options production and dev and optional don't go together"
)
module.fail_json(msg="Options production and dev and optional don't go together")
if production and dev:
module.fail_json(msg="Options production and dev don't go together")
@ -402,9 +390,7 @@ def main():
module.fail_json(msg="Semver not supported on remote url downloads")
if name is None and optional:
module.fail_json(
msg="Optional not available when package name not provided, use no_optional instead"
)
module.fail_json(msg="Optional not available when package name not provided, use no_optional instead")
if state == "absent" and name is None:
module.fail_json(msg="Package name is required for uninstalling")