Skip to content
Snippets Groups Projects
Commit df280510 authored by nimrod's avatar nimrod
Browse files

Address some linters warnings and a typo.

parent fb00e970
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
# pylint: disable=import-error # pylint: disable=import-error
from sh import vagrant from sh import vagrant
# pylint: disable=no-name-in-module
from parse import parse from parse import parse
...@@ -19,6 +18,7 @@ for line in vagrant.box("list"): ...@@ -19,6 +18,7 @@ for line in vagrant.box("list"):
boxes[box["name"]][box["provider"]] = [box["version"]] boxes[box["name"]][box["provider"]] = [box["version"]]
else: else:
boxes[box["name"]] = {box["provider"]: [box["version"]]} boxes[box["name"]] = {box["provider"]: [box["version"]]}
# pylint: disable=consider-using-dict-items
for box in boxes: for box in boxes:
for provider in boxes[box]: for provider in boxes[box]:
for version in boxes[box][provider][:-1]: for version in boxes[box][provider][:-1]:
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
# pylint: disable=import-error # pylint: disable=import-error
from sh import vagrant from sh import vagrant
# pylint: disable=no-name-in-module
from parse import parse from parse import parse
...@@ -19,6 +18,7 @@ for line in vagrant.box("list"): ...@@ -19,6 +18,7 @@ for line in vagrant.box("list"):
boxes[box["name"]].append(box["provider"]) boxes[box["name"]].append(box["provider"])
else: else:
boxes[box["name"]] = [box["provider"]] boxes[box["name"]] = [box["provider"]]
# pylint: disable=consider-using-dict-items
for box in boxes: for box in boxes:
for provider in boxes[box]: for provider in boxes[box]:
print("Updating box {0} provider {1}.".format(box, provider)) print("Updating box {0} provider {1}.".format(box, provider))
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
set -eu set -eu
# Update the default branch without checking out that branch (unless we're # Update the default branch without checking out that branch (unless we're
# already on the default branch, then just run git Pull. Accepts 1 paramter, # already on the default branch, then just run git Pull. Accepts 1 parameter,
# the remote name (defaults to origin). # the remote name (defaults to origin).
default_branch="$(git default-branch)" default_branch="$(git default-branch)"
......
...@@ -22,4 +22,5 @@ if __name__ == "__main__": ...@@ -22,4 +22,5 @@ if __name__ == "__main__":
method="POST", method="POST",
headers={"Content-Type": "application/json"}, headers={"Content-Type": "application/json"},
) )
# pylint: disable=consider-using-with
urllib.request.urlopen(request) # nosec urllib.request.urlopen(request) # nosec
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment