Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 1, 2023
1 parent d90163f commit 2a043a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/action/git_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def _check_argspec(self: T) -> None:
valid, errors, self._task.args = aav.validate()
if not valid:
raise AnsibleActionFail(errors)
if self._task.args.get("token") == "": # noqa: PLC1901
if self._task.args.get("token") == "":
err = "Token can not be an empty string"
raise AnsibleActionFail(err)

Expand Down
4 changes: 2 additions & 2 deletions plugins/action/git_retrieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ def _check_argspec(self: T) -> None:
if not valid:
raise AnsibleActionFail(errors)
# ansible provides an empty sting if the parent is used
if self._task.args["origin"].get("token") == "": # noqa: PLC1901
if self._task.args["origin"].get("token") == "":
err = "Origin token can not be an empty string"
raise AnsibleActionFail(err)
if self._task.args["upstream"].get("token") == "": # noqa: PLC1901
if self._task.args["upstream"].get("token") == "":
err = "Upstream token can not be an empty string"
raise AnsibleActionFail(err)

Expand Down

0 comments on commit 2a043a6

Please sign in to comment.