1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
From ce7c7bba2b5d95f74362a0e1b377bca551a43ddf Mon Sep 17 00:00:00 2001
From: Benjamin Drung <benjamin.drung@profitbricks.com>
Date: Mon, 30 Apr 2018 17:31:22 +0200
Subject: [PATCH] Fix flake8 issues
```
$ python3 -m flake8 --max-line-length=99 examples profitbricks tests setup.py
profitbricks/client.py:170:100: E501 line too long (106 > 99 characters)
tests/test_user_management.py:233:1: W293 blank line contains whitespace
tests/test_user_management.py:234:5: E303 too many blank lines (2)
tests/test_user_management.py:274:37: E128 continuation line under-indented for visual indent
tests/test_user_management.py:275:37: E128 continuation line under-indented for visual indent
tests/test_user_management.py:280:1: W293 blank line contains whitespace
```
Forwarded: https://github.com/profitbricks/profitbricks-sdk-python/pull/75
---
profitbricks/client.py | 3 ++-
tests/test_user_management.py | 7 +++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/profitbricks/client.py b/profitbricks/client.py
index 8dfc46a..ec06124 100644
--- a/profitbricks/client.py
+++ b/profitbricks/client.py
@@ -167,7 +167,8 @@ class ProfitBricksService(object):
if not password and use_keyring:
logger = logging.getLogger(__name__)
- question = ("Please enter your password for {} on {}: ".format(self.username, self.host_base))
+ question = ("Please enter your password for {} on {}: "
+ .format(self.username, self.host_base))
if HAS_KEYRING:
password = keyring.get_password(self.keyring_identificator, self.username)
if password is None:
diff --git a/tests/test_user_management.py b/tests/test_user_management.py
index 28bed4b..e2eda90 100644
--- a/tests/test_user_management.py
+++ b/tests/test_user_management.py
@@ -230,7 +230,6 @@ class TestUserManagement(unittest.TestCase):
self.resource['group']['name'] + ' - RENAME')
self.assertFalse(group['properties']['createDataCenter'])
-
def test_delete_group(self):
group = self.client.delete_group(group_id=self.group2['id'])
@@ -271,13 +270,13 @@ class TestUserManagement(unittest.TestCase):
def test_update_share(self):
share = self.client.update_share(group_id=self.group3['id'],
- resource_id=self.datacenter['id'],
- share_privilege=False)
+ resource_id=self.datacenter['id'],
+ share_privilege=False)
self.assertEqual(share['id'], self.datacenter['id'])
self.assertEqual(share['type'], 'resource')
self.assertFalse(share['properties']['sharePrivilege'])
-
+
def test_get_share_failure(self):
try:
self.client.get_share(group_id=self.group3['id'],
--
2.17.0
|