Merge lp:~canonical-platform-qa/snappy-ecosystem-tests/flake8-fixes into lp:snappy-ecosystem-tests

Proposed by Omer Akram
Status: Merged
Approved by: Omer Akram
Approved revision: 38
Merged at revision: 35
Proposed branch: lp:~canonical-platform-qa/snappy-ecosystem-tests/flake8-fixes
Merge into: lp:snappy-ecosystem-tests
Diff against target: 171 lines (+23/-18)
9 files modified
snappy_ecosystem_tests/environment/constants.py (+6/-6)
snappy_ecosystem_tests/environment/containers/lxd.py (+2/-1)
snappy_ecosystem_tests/environment/managers.py (+6/-5)
snappy_ecosystem_tests/environment/setup.py (+2/-2)
snappy_ecosystem_tests/helpers/store_apis/rest_apis.py (+1/-1)
snappy_ecosystem_tests/helpers/test_base.py (+1/-0)
snappy_ecosystem_tests/run.py (+2/-2)
snappy_ecosystem_tests/tests/test_store_login.py (+2/-1)
snappy_ecosystem_tests/utils/store_versions.py (+1/-0)
To merge this branch: bzr merge lp:~canonical-platform-qa/snappy-ecosystem-tests/flake8-fixes
Reviewer Review Type Date Requested Status
platform-qa-bot continuous-integration Approve
Heber Parrucci (community) Approve
Review via email: mp+319353@code.launchpad.net

Commit message

Minor cosmetic changes to make flake8 less sad.

Description of the change

Minor cosmetic changes to make flake8 less sad.

To post a comment you must log in.
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Heber Parrucci (heber013) wrote :

One comment inline.
Additionally, why don't you just add flake8 checks as part of the run_checks script instead of fixing flake8 stuff after a branch is landed?

review: Needs Information
Revision history for this message
Omer Akram (om26er) wrote :

Will do that separately but this code was hurting my OCD :)

37. By Omer Akram

update max-line-length rule to 79

Revision history for this message
Heber Parrucci (heber013) wrote :

Reply inline

38. By Omer Akram

revert some

Revision history for this message
Omer Akram (om26er) wrote :

replied.

Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Heber Parrucci (heber013) wrote :

LGTM. Let's create a card for adding flake8 chack in run_checks

review: Approve
Revision history for this message
platform-qa-bot (platform-qa-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Omer Akram (om26er) wrote :

card created.

Revision history for this message
Omer Akram (om26er) wrote :

given its a simple change, I top-approved myself.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'snappy_ecosystem_tests/environment/constants.py'
2--- snappy_ecosystem_tests/environment/constants.py 2017-03-03 10:19:23 +0000
3+++ snappy_ecosystem_tests/environment/constants.py 2017-03-08 18:00:18 +0000
4@@ -24,14 +24,14 @@
5 SNAPCRAFT = 'snapcraft'
6
7 DEPENDENCIES = {
8- SNAPD : [],
9- SNAPCRAFT : [],
10- "shared" : ["expect"]
11+ SNAPD: [],
12+ SNAPCRAFT: [],
13+ "shared": ["expect"]
14 }
15
16 PROFILES = {
17- "staging":{
18- SNAPD:{
19+ "staging": {
20+ SNAPD: {
21 "channel": "xenial",
22 "package_name": 'snapd',
23 "environment_variables": {
24@@ -59,7 +59,7 @@
25 "https://search.apps.ubuntu.com/"
26 }
27 },
28- "snapweb":{
29+ "snapweb": {
30 "url": "https://myapps.developer.ubuntu.com/"
31 },
32 }
33
34=== modified file 'snappy_ecosystem_tests/environment/containers/lxd.py'
35--- snappy_ecosystem_tests/environment/containers/lxd.py 2017-03-08 15:33:58 +0000
36+++ snappy_ecosystem_tests/environment/containers/lxd.py 2017-03-08 18:00:18 +0000
37@@ -37,7 +37,8 @@
38 LOGGER = logging.getLogger(__name__)
39 DOMAIN_PING = 'ubuntu.com'
40
41-class LxdDriver:
42+
43+class LXDDriver:
44 """Manage lxd containers"""
45
46 def __init__(self):
47
48=== modified file 'snappy_ecosystem_tests/environment/managers.py'
49--- snappy_ecosystem_tests/environment/managers.py 2017-03-08 14:53:44 +0000
50+++ snappy_ecosystem_tests/environment/managers.py 2017-03-08 18:00:18 +0000
51@@ -21,22 +21,23 @@
52
53 from snappy_ecosystem_tests.environment.constants import (
54 PROFILES, DEPENDENCIES)
55-from snappy_ecosystem_tests.environment.containers.lxd import LxdDriver
56+from snappy_ecosystem_tests.environment.containers.lxd import LXDDriver
57
58 CONTAINERS = {
59- "snapd":{
60+ "snapd": {
61 "release": "16.04"
62 },
63- "snapcraft":{
64+ "snapcraft": {
65 "release": "16.04"
66 }
67 }
68
69-class _LxdManager:
70+
71+class _LXDManager:
72 """Manager for lxd containers"""
73
74 def __init__(self):
75- self.driver = LxdDriver()
76+ self.driver = LXDDriver()
77
78 def setup(self, profile):
79 """setup the container based on the profile"""
80
81=== modified file 'snappy_ecosystem_tests/environment/setup.py'
82--- snappy_ecosystem_tests/environment/setup.py 2017-03-08 14:53:44 +0000
83+++ snappy_ecosystem_tests/environment/setup.py 2017-03-08 18:00:18 +0000
84@@ -24,13 +24,13 @@
85
86 import logging
87
88-from snappy_ecosystem_tests.environment.managers import _LxdManager
89+from snappy_ecosystem_tests.environment.managers import _LXDManager
90
91 logging.basicConfig(level=logging.DEBUG)
92
93
94 SUPPORTED_MODULES = {
95- "lxd": _LxdManager
96+ "lxd": _LXDManager
97 }
98
99
100
101=== modified file 'snappy_ecosystem_tests/helpers/store_apis/rest_apis.py'
102--- snappy_ecosystem_tests/helpers/store_apis/rest_apis.py 2017-02-21 21:09:28 +0000
103+++ snappy_ecosystem_tests/helpers/store_apis/rest_apis.py 2017-03-08 18:00:18 +0000
104@@ -35,8 +35,8 @@
105 UnknownLength,
106 )
107 from simplejson.scanner import JSONDecodeError
108+
109 from snappy_ecosystem_tests.commons.config import CONFIG_STACK
110-
111 from snappy_ecosystem_tests.helpers.snapcraft import constants
112 from snappy_ecosystem_tests.helpers.snapcraft.config import SnapcraftConfig
113 from snappy_ecosystem_tests.helpers.snapcraft.indicators import (
114
115=== modified file 'snappy_ecosystem_tests/helpers/test_base.py'
116--- snappy_ecosystem_tests/helpers/test_base.py 2017-02-10 19:20:45 +0000
117+++ snappy_ecosystem_tests/helpers/test_base.py 2017-03-08 18:00:18 +0000
118@@ -18,6 +18,7 @@
119
120 import testscenarios
121 import testtools
122+
123 from snappy_ecosystem_tests.helpers import fixture_setup
124 from snappy_ecosystem_tests.helpers.fixture_setup import SetTestStore
125
126
127=== modified file 'snappy_ecosystem_tests/run.py'
128--- snappy_ecosystem_tests/run.py 2017-03-01 21:51:29 +0000
129+++ snappy_ecosystem_tests/run.py 2017-03-08 18:00:18 +0000
130@@ -30,8 +30,7 @@
131 def _parse_arguments():
132 """Parse and filter command line arguments to makethem pytest compatible"""
133 sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
134- parser = argparse.ArgumentParser(description=
135- 'Run snappy ecosystem tests.')
136+ parser = argparse.ArgumentParser(description='Run snappy ecosystem tests.')
137 parser.add_argument('--proxy',
138 help='proxy to use for creating the virtual env.',
139 required=False)
140@@ -53,5 +52,6 @@
141 if value:
142 os.environ[arg] = value
143
144+
145 if __name__ == '__main__':
146 sys.exit(pytest.main(args=_parse_arguments() + ['-p', 'no:cacheprovider']))
147
148=== modified file 'snappy_ecosystem_tests/tests/test_store_login.py'
149--- snappy_ecosystem_tests/tests/test_store_login.py 2017-02-15 19:35:54 +0000
150+++ snappy_ecosystem_tests/tests/test_store_login.py 2017-03-08 18:00:18 +0000
151@@ -21,7 +21,8 @@
152 """Test for Login to the Store via Web Interface, snapcraft and snapd"""
153
154 from snappy_ecosystem_tests.helpers.snapcraft.client import Snapcraft
155-from snappy_ecosystem_tests.helpers.web_test_base import UbuntuStoreWebTestsBase
156+from snappy_ecosystem_tests.helpers.web_test_base import (
157+ UbuntuStoreWebTestsBase)
158
159
160 class StoreLoginTestCase(UbuntuStoreWebTestsBase):
161
162=== modified file 'snappy_ecosystem_tests/utils/store_versions.py'
163--- snappy_ecosystem_tests/utils/store_versions.py 2017-02-22 17:43:06 +0000
164+++ snappy_ecosystem_tests/utils/store_versions.py 2017-03-08 18:00:18 +0000
165@@ -70,5 +70,6 @@
166 print("{}: Production: {:>5}".format(service,
167 data[(service, 'production')]))
168
169+
170 if __name__ == '__main__':
171 print_versions()

Subscribers

People subscribed via source and target branches