Michael Hudson-Doyle has proposed merging ~mwhudson/curtin:upgrade-pylint into 
curtin:master.

Commit message:
tox.ini: update pylint

and fix two new reports



Requested reviews:
  curtin developers (curtin-dev)

For more details, see:
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/444588
-- 
Your team curtin developers is requested to review the proposed merge of 
~mwhudson/curtin:upgrade-pylint into curtin:master.
diff --git a/curtin/block/__init__.py b/curtin/block/__init__.py
index b6802fb..38a105c 100644
--- a/curtin/block/__init__.py
+++ b/curtin/block/__init__.py
@@ -1164,8 +1164,8 @@ def exclusive_open(path, exclusive=True):
         flags += os.O_EXCL
     try:
         fd = os.open(path, flags)
+        fd_needs_closing = True
         try:
-            fd_needs_closing = True
             with os.fdopen(fd, mode) as fo:
                 yield fo
             fd_needs_closing = False
diff --git a/curtin/url_helper.py b/curtin/url_helper.py
index 38f74c9..c2af426 100644
--- a/curtin/url_helper.py
+++ b/curtin/url_helper.py
@@ -419,6 +419,7 @@ def _oauth_headers_none(url, consumer_key, token_key, token_secret,
 def _oauth_headers_oauth(url, consumer_key, token_key, token_secret,
                          consumer_secret, clockskew=0):
     """Build OAuth headers with oauth using given credentials."""
+    # pylint: disable=used-before-assignment
     consumer = oauth.OAuthConsumer(consumer_key, consumer_secret)
     token = oauth.OAuthToken(token_key, token_secret)
 
diff --git a/tox.ini b/tox.ini
index 2fc4027..32c6602 100644
--- a/tox.ini
+++ b/tox.ini
@@ -43,7 +43,7 @@ commands = {envpython} -m pyflakes {posargs:curtin/ tests/ tools/}
 basepython = python3
 sitepackages = true
 deps = {[testenv]deps}
-    pylint==2.12.2
+    pylint==2.17.4
     git+https://git.launchpad.net/simplestreams
 commands = {envpython} -m pylint --errors-only {posargs:curtin tests/vmtests}
 
-- 
Mailing list: https://launchpad.net/~curtin-dev
Post to     : curtin-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~curtin-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to