← Back to team overview

curtin-dev team mailing list archive

[Merge] ~paride/curtin:fix-pylint into curtin:master

 

Paride Legovini has proposed merging ~paride/curtin:fix-pylint into curtin:master.

Commit message:
Fix the py3 pylint ci run

Changes:

 - pylintrc: fix the generated-members syntax
    
   generated-members accepts a list of python regular expressions,
   but we are using it as if accepted glob-like wildcards. This
   is wrong, causing errors like:
    
     internal error with sending report for module ['curtin/udev.py']
     nothing to repeat at position 0
    
   when using pylint 2.3.1 and fully crashing pylint 2.5.3 and 2.6.0.
    
   This change fixes the syntax error and removes the entries
   we don't actually need.

 - Fix LOG.error format string
 - tox: bump py3 pylint to version 2.6.0

Requested reviews:
  curtin developers (curtin-dev)

For more details, see:
https://code.launchpad.net/~paride/curtin/+git/curtin/+merge/390749
-- 
Your team curtin developers is requested to review the proposed merge of ~paride/curtin:fix-pylint into curtin:master.
diff --git a/curtin/block/__init__.py b/curtin/block/__init__.py
index 10b8b9e..0cf0866 100644
--- a/curtin/block/__init__.py
+++ b/curtin/block/__init__.py
@@ -333,7 +333,7 @@ def dmsetup_info(devname):
                                  ','.join(fields), '--noheading',
                                  '--separator', _SEP], capture=True)
     except util.ProcessExecutionError as e:
-        LOG.error('Failed to run dmsetup info:', e)
+        LOG.error('Failed to run dmsetup info: %s', e)
         return {}
 
     values = out.strip().split(_SEP)
diff --git a/pylintrc b/pylintrc
index 167cff0..67a4e01 100644
--- a/pylintrc
+++ b/pylintrc
@@ -7,7 +7,7 @@ jobs=0
 # List of members which are set dynamically and missed by pylint inference
 # system, and so shouldn't trigger E1101 when accessed. Python regular
 # expressions are accepted.
-generated-members=DISTROS.*,parse_*,*_data
+generated-members=DISTROS\.
 
 # List of module names for which member attributes should not be checked
 # (useful for modules/projects where namespaces are manipulated during runtime
diff --git a/tox.ini b/tox.ini
index 72d56d4..04b43b6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -60,7 +60,7 @@ commands = {envpython} -m pyflakes {posargs:curtin/ tests/ tools/}
 # set basepython because tox 1.6 (trusty) does not support generated environments
 basepython = python3
 deps = {[testenv]deps}
-    pylint==2.3.1
+    pylint==2.6.0
     git+https://git.launchpad.net/simplestreams
 commands = {envpython} -m pylint --errors-only {posargs:curtin tests/vmtests}
 

Follow ups