Skip to content

Commit

Permalink
Make pylint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceaulinic committed Jul 24, 2023
1 parent 315ad54 commit 12c1c90
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ disable=R,
E8731,
W0232,
C0415,
E9405,
E9402,
E0599,
W1699,
3rd-party-local-module-not-gated,
pep8-reserved-keywords

Expand Down
6 changes: 3 additions & 3 deletions salt_sproxy/_roster/ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ def _get_hosts_from_group(group):
def _get_hostvars(host):
hostvars = __context__["inventory"]["_meta"].get("hostvars", {}).get(host, {})
ret = copy.deepcopy(__opts__.get("roster_defaults", {}))
for value in CONVERSION:
if value in hostvars:
ret[CONVERSION[value]] = hostvars.pop(value)
for key, value in CONVERSION.items():
if key in hostvars:
ret[value] = hostvars.pop(key)
ret["minion_opts"] = hostvars
if "host" not in ret:
ret["host"] = host
Expand Down
4 changes: 2 additions & 2 deletions salt_sproxy/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from __future__ import absolute_import

import sys
import optparse
import optparse # pylint: disable=deprecated-module
import multiprocessing

import salt_sproxy.version
Expand Down Expand Up @@ -43,7 +43,7 @@ def dependency_information(include_salt_cloud=False):
libraries that may be necessary for various Proxy (or Execution) Modules.
"""
libs = [
("Python", None, sys.version.rsplit("\n")[0].strip()),
("Python", None, sys.version.rsplit("\n", maxsplit=1)[0].strip()),
("NAPALM", "napalm", "__version__"),
("Netmiko", "netmiko", "__version__"),
("junos-eznc", None, jnpr_version),
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ deps =

basepython = python3.9
commands =
black --check --skip-string-normalization .
black --check .

[testenv:pylint]
deps =
Expand Down

0 comments on commit 12c1c90

Please sign in to comment.