Merge lp:~cprov/core-image-watcher/lint into lp:core-image-watcher

Proposed by Celso Providelo on 2015-04-08
Status: Needs review
Proposed branch: lp:~cprov/core-image-watcher/lint
Merge into: lp:core-image-watcher
Diff against target: 39 lines (+10/-2)
3 files modified
called-by-tarmac.py (+7/-0)
core_image_watcher/__init__.py (+1/-1)
test_requirements.txt (+2/-1)
To merge this branch: bzr merge lp:~cprov/core-image-watcher/lint
Reviewer Review Type Date Requested Status
Francis Ginther Approve on 2015-04-08
Thomi Richards (community) 2015-04-08 Needs Fixing on 2015-04-08
Review via email: mp+255454@code.launchpad.net

Commit message

Running pylint checks before merging.

Description of the change

Running pylint checks before merging.

Warnings, Recommendations and Style checks are disabled for now, we only care about Errors.

To post a comment you must log in.
Thomi Richards (thomir) wrote :

My vote is not to merge this. As shown in the diff, pylint doesn't understand some pretty straight-forward things, and forces us to either make our code less clear, or litter linter disabling comments everywhere.

If silly errors are landing in trunk, let's make sure we do a better job of reviewing MPs, writing tests, and/or manually testing our code (as appropriate to the situation).

review: Needs Fixing
Francis Ginther (fginther) wrote :

I think we should consider pylint as an option in the next sprint. As late as it is in the current sprint, I think it will end up being a distraction trying to get already existing code to comply and not produce it's intended benefits (which could be good benefits) and we don't have that much new code to write for this sprint.

But since this work is already done, I'm ok landing it and seeing how it works. If we want to invest more pylint in the future, we need to start somewhere to know if it's actually going to help.

review: Approve

Unmerged revisions

17. By Celso Providelo on 2015-04-08

Fixing pylint issue.

16. By Celso Providelo on 2015-04-08

Running pylint checks before merging.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'called-by-tarmac.py'
2--- called-by-tarmac.py 2015-04-01 01:12:25 +0000
3+++ called-by-tarmac.py 2015-04-08 01:19:55 +0000
4@@ -94,6 +94,13 @@
5 'setup.py',
6 'flake8',
7 ],
8+ [
9+ os.path.join(ve_dir, 'bin', 'python3'),
10+ 'setup.py',
11+ 'lint',
12+ '--lint-disable=W,C,R',
13+ '--lint-reports=no'
14+ ],
15 )
16 for cmd in all_cmds:
17 ret = _run_command(cmd)
18
19=== modified file 'core_image_watcher/__init__.py'
20--- core_image_watcher/__init__.py 2015-04-03 02:05:16 +0000
21+++ core_image_watcher/__init__.py 2015-04-08 01:19:55 +0000
22@@ -152,7 +152,7 @@
23
24 logger.info('Started!', extra=logging_extra)
25
26- amqp_uris = config.get('amqp', 'uris').split()
27+ amqp_uris = str(config.get('amqp', 'uris')).split()
28 location = config.get('image', 'location')
29 channel = config.get('image', 'channel')
30 device = config.get('image', 'device')
31
32=== modified file 'test_requirements.txt'
33--- test_requirements.txt 2015-04-01 01:12:25 +0000
34+++ test_requirements.txt 2015-04-08 01:19:55 +0000
35@@ -1,2 +1,3 @@
36+flake8==2.4.0
37+setuptools-lint==0.3
38 testtools==1.7.1
39-flake8==2.4.0

Subscribers

People subscribed via source and target branches