Merge lp:~robru/bileto/pylint-cleanup into lp:bileto

Proposed by Robert Bruce Park
Status: Merged
Merged at revision: 549
Proposed branch: lp:~robru/bileto/pylint-cleanup
Merge into: lp:bileto
Diff against target: 61 lines (+5/-2)
5 files modified
Makefile (+1/-1)
bileto/app.py (+1/-0)
bileto/models.py (+1/-0)
tests/test_app.py (+1/-1)
tests/test_britney.py (+1/-0)
To merge this branch: bzr merge lp:~robru/bileto/pylint-cleanup
Reviewer Review Type Date Requested Status
CU2D maintainers Pending
Review via email: mp+297738@code.launchpad.net

Commit message

Pylint cleanup.

To post a comment you must log in.
lp:~robru/bileto/pylint-cleanup updated
550. By Robert Bruce Park

Temporarily disable tests.

551. By Robert Bruce Park

Minor pylint fixes.

552. By Robert Bruce Park

Moar.

553. By Robert Bruce Park

Fix disable.

554. By Robert Bruce Park

Re-enable tests.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2016-06-17 07:19:52 +0000
3+++ Makefile 2016-06-17 08:51:18 +0000
4@@ -17,7 +17,7 @@
5 python3 -m coverage report --include="t*/*,b*/*" --show-missing --fail-under=100
6 find -name '*.py' | xargs python3 -m pyflakes
7 find -name '*.py' | xargs python3 -m pep8
8- find -name '*.py' | xargs python3 -m pylint --disable broad-except,fixme,import-error,interface-not-implemented,invalid-name,no-init,no-member,no-name-in-module,no-self-use,no-value-for-parameter,protected-access,star-args,too-few-public-methods,too-many-ancestors,too-many-arguments,too-many-instance-attributes,too-many-public-methods,unsubscriptable-object,unused-argument,unused-variable
9+ find -name '*.py' | xargs python3 -m pylint --disable bad-option-value,broad-except,fixme,import-error,invalid-name,no-init,no-name-in-module,no-member,no-self-use,no-value-for-parameter,protected-access,star-args,too-few-public-methods,too-many-arguments,too-many-public-methods,unused-argument,unused-variable
10
11 devel:
12 ./run.py
13
14=== modified file 'bileto/app.py'
15--- bileto/app.py 2016-05-24 19:45:46 +0000
16+++ bileto/app.py 2016-06-17 08:51:18 +0000
17@@ -18,6 +18,7 @@
18 STAGING = 'staging' in Config.ppa_team
19
20
21+# pylint: disable=too-many-ancestors
22 class ProxiedRequest(Request):
23 """Teach Flask how to behave behind an SSL reverseproxy."""
24 def __init__(self, environ, populate_request=True, shallow=False):
25
26=== modified file 'bileto/models.py'
27--- bileto/models.py 2016-06-16 06:14:38 +0000
28+++ bileto/models.py 2016-06-17 08:51:18 +0000
29@@ -175,6 +175,7 @@
30 db.session.commit()
31
32
33+# pylint: disable=too-many-instance-attributes
34 class Request(db.Model, BiletoModel):
35 """Represents one landing ticket in the database."""
36 request_id = db.Column(BigInt, primary_key=True, doc='Request ID')
37
38=== modified file 'tests/test_app.py'
39--- tests/test_app.py 2016-05-24 19:31:58 +0000
40+++ tests/test_app.py 2016-06-17 08:51:18 +0000
41@@ -25,7 +25,7 @@
42 def test_read_from_file(self):
43 """Ensure that we can read files from disk correctly."""
44 Config.dirs = ('/etc/python3/',)
45- self.assertIn('standard', Config['debian_config'])
46+ self.assertIn('standard', Config.debian_config)
47
48 def test_imports(self):
49 """Ensure long-running code doesn't import any short-lived code."""
50
51=== modified file 'tests/test_britney.py'
52--- tests/test_britney.py 2016-06-08 22:51:57 +0000
53+++ tests/test_britney.py 2016-06-17 08:51:18 +0000
54@@ -70,6 +70,7 @@
55
56 @staticmethod
57 def _requests():
58+ """Mock out requests lib and return some stock json."""
59 with patch.object(iterate, 'get') as mock:
60 mock.return_value.json.return_value = TICKETS_JSON
61 return iterate.get_requests()

Subscribers

People subscribed via source and target branches