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

Proposed by Paride Legovini
Status: Merged
Approved by: Dan Watkins
Approved revision: aa0c920d46c8768bf176c71bb9695cc42c42f8e4
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~paride/curtin:fix-pylint
Merge into: curtin:master
Diff against target: 38 lines (+3/-3)
3 files modified
curtin/block/__init__.py (+1/-1)
pylintrc (+1/-1)
tox.ini (+1/-1)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Dan Watkins (community) Approve
Review via email: mp+390749@code.launchpad.net

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

To post a comment you must log in.
Revision history for this message
Dan Watkins (oddbloke) wrote :

LGTM, thanks!

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/curtin/block/__init__.py b/curtin/block/__init__.py
2index 10b8b9e..0cf0866 100644
3--- a/curtin/block/__init__.py
4+++ b/curtin/block/__init__.py
5@@ -333,7 +333,7 @@ def dmsetup_info(devname):
6 ','.join(fields), '--noheading',
7 '--separator', _SEP], capture=True)
8 except util.ProcessExecutionError as e:
9- LOG.error('Failed to run dmsetup info:', e)
10+ LOG.error('Failed to run dmsetup info: %s', e)
11 return {}
12
13 values = out.strip().split(_SEP)
14diff --git a/pylintrc b/pylintrc
15index 167cff0..67a4e01 100644
16--- a/pylintrc
17+++ b/pylintrc
18@@ -7,7 +7,7 @@ jobs=0
19 # List of members which are set dynamically and missed by pylint inference
20 # system, and so shouldn't trigger E1101 when accessed. Python regular
21 # expressions are accepted.
22-generated-members=DISTROS.*,parse_*,*_data
23+generated-members=DISTROS\.
24
25 # List of module names for which member attributes should not be checked
26 # (useful for modules/projects where namespaces are manipulated during runtime
27diff --git a/tox.ini b/tox.ini
28index 72d56d4..04b43b6 100644
29--- a/tox.ini
30+++ b/tox.ini
31@@ -60,7 +60,7 @@ commands = {envpython} -m pyflakes {posargs:curtin/ tests/ tools/}
32 # set basepython because tox 1.6 (trusty) does not support generated environments
33 basepython = python3
34 deps = {[testenv]deps}
35- pylint==2.3.1
36+ pylint==2.6.0
37 git+https://git.launchpad.net/simplestreams
38 commands = {envpython} -m pylint --errors-only {posargs:curtin tests/vmtests}
39

Subscribers

People subscribed via source and target branches