Skip to content

Commit

Permalink
Fix modules for newest pylint in ansible-test (containers#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
sshnaidm authored Aug 15, 2021
1 parent e9ace7b commit 1f28b52
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions contrib/ansible-lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
mkdir -p /tmp/ansible-lint-installs
mkdir -p /tmp/ansible-lint-collection
rm -rf /tmp/ansible-lint-collection/*
ansible-galaxy collection build --output-path /tmp/ansible-lint-collection --force
pushd /tmp/ansible-lint-collection/
ansible-galaxy collection install -vvv --force $(ls /tmp/ansible-lint-collection/) -p /tmp/ansible-lint-installs
pushd /tmp/ansible-lint-installs/ansible_collections/containers/podman
ansible-test sanity --docker --color --truncate 0 --no-redact --no-pip-check --python 3.9 -v plugins/ tests/
popd
popd
4 changes: 2 additions & 2 deletions plugins/module_utils/podman/podman_pod_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ def diffparam_infra_image(self):
after = self.params['infra_image']
before = before.replace(":latest", "")
after = after.replace(":latest", "")
before = before.split("/")[-1]
after = after.split("/")[-1]
before = before.split("/")[-1] # pylint: disable=W,C,R
after = after.split("/")[-1] # pylint: disable=W,C,R
return self._diff_update_and_compare('infra_image', before, after)

# TODO(sshnaidm): https://github.com/containers/podman/pull/6956
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/podman_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@


def combine(results):
changed = any([i.get('changed', False) for i in results])
failed = any([i.get('failed', False) for i in results])
changed = any(i.get('changed', False) for i in results)
failed = any(i.get('failed', False) for i in results)
actions = []
podman_actions = []
containers = []
Expand Down

0 comments on commit 1f28b52

Please sign in to comment.