Merge ~cristiangsp/launchpad:linting-f811 into launchpad:master

Proposed by Cristian Gonzalez
Status: Merged
Approved by: Cristian Gonzalez
Approved revision: 40ff7bfe918fd52666f6108740abde6a75054c8a
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cristiangsp/launchpad:linting-f811
Merge into: launchpad:master
Diff against target: 48 lines (+6/-7)
3 files modified
lib/devscripts/tests/test_sourcecode.py (+1/-1)
lib/lp/bugs/scripts/debbugs.py (+0/-2)
lib/lp/services/features/testing.py (+5/-4)
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+406647@code.launchpad.net

Commit message

Fixing F811 linting errors

Description of the change

Fixing F811 linting errors

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/devscripts/tests/test_sourcecode.py b/lib/devscripts/tests/test_sourcecode.py
2index 6b538c7..ef03676 100644
3--- a/lib/devscripts/tests/test_sourcecode.py
4+++ b/lib/devscripts/tests/test_sourcecode.py
5@@ -112,7 +112,7 @@ class TestInterpretConfiguration(unittest.TestCase):
6 config = interpret_config([['key', 'value;revno=45']], False)
7 self.assertEqual({'key': ('value', '45', False)}, config)
8
9- def test_key_value_revision(self):
10+ def test_key_value_revision_with_multiple_revnos_raises_error(self):
11 # A (key, value) pair without a third optional value when the
12 # value has multiple suffixes of ``;revno=[REVISION]`` raises an
13 # error.
14diff --git a/lib/lp/bugs/scripts/debbugs.py b/lib/lp/bugs/scripts/debbugs.py
15index a15a73b..81055c1 100644
16--- a/lib/lp/bugs/scripts/debbugs.py
17+++ b/lib/lp/bugs/scripts/debbugs.py
18@@ -271,8 +271,6 @@ class Database:
19 return bug
20
21 if __name__ == '__main__':
22- import sys
23-
24 for bug in Database('/srv/debzilla.no-name-yet.com/debbugs'):
25 try:
26 print(bug, bug.subject)
27diff --git a/lib/lp/services/features/testing.py b/lib/lp/services/features/testing.py
28index e4ed8be..576322f 100644
29--- a/lib/lp/services/features/testing.py
30+++ b/lib/lp/services/features/testing.py
31@@ -67,12 +67,13 @@ class FeatureFixtureMixin:
32
33 original_controller = get_relevant_feature_controller()
34
35- def scope_lookup(scope_name):
36- request = get_current_browser_request()
37- return ScopesFromRequest(request).lookup(scope_name)
38-
39 if self.override_scope_lookup:
40 scope_lookup = self.override_scope_lookup
41+ else:
42+ def scope_lookup(scope_name):
43+ request = get_current_browser_request()
44+ return ScopesFromRequest(request).lookup(scope_name)
45+
46 install_feature_controller(
47 FeatureController(scope_lookup, rule_source))
48 self.addCleanup(install_feature_controller, original_controller)

Subscribers

People subscribed via source and target branches

to status/vote changes: