FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

PEP8, durr · python-webuntis/python-webuntis@73169e4 · GitHub

Commit 73169e4

Browse files
committed
PEP8, durr
1 parent 66e14f1 commit 73169e4

5 files changed

Lines changed: 6 additions & 16 deletions

File tree

‎webuntis/errors.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from __future__ import unicode_literals
99

10+
1011
class Error(Exception):
1112
pass
1213

‎webuntis/session.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def __exit__(self, exc_type, exc_value, traceback):
6666

6767
def logout(self, suppress_errors=False):
6868
'''Log out of session
69-
69+
7070
:param suppress_errors: boolean, whether to not raise an error if we
7171
already were logged out.
7272
'''

‎webuntis/tests/__init__.py‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def setUp(self):
3030

3131
self.session = webuntis.Session()
3232

33-
3433
def tearDown(self):
3534
self.request_patcher.stop()
3635
self.session = None
@@ -69,7 +68,6 @@ def test_options_values(self):
6968
raise Exception('Expected that OptionStore.values is a \
7069
dictionary')
7170

72-
7371
def test_getdepartments_mock(self):
7472
jsonstr = json.load(
7573
open(self.data_path + '/getdepartments_mock.json')
@@ -164,7 +162,6 @@ def test_gettimetables_mock(self):
164162
period_raw['endTime']
165163
)
166164

167-
168165
def test_getrooms_mock(self):
169166
jsonstr = json.load(
170167
open(self.data_path + '/getrooms_mock.json')
@@ -179,7 +176,6 @@ def test_getrooms_mock(self):
179176
self.assertEqual(room_raw['name'], room.name)
180177
self.assertEqual(room_raw['id'], room.id)
181178

182-
183179
def test_getschoolyears_mock(self):
184180
jsonstr = json.load(
185181
open(self.data_path + '/getschoolyears_mock.json')
@@ -215,7 +211,6 @@ def test_getsubjects_mock(self):
215211
self.assertEqual(subj_raw['longName'], subj.long_name)
216212
self.assertEqual(subj_raw['name'], subj.name)
217213

218-
219214
def test_getteachers_mock(self):
220215
jsonstr = json.load(
221216
open(self.data_path + '/getteachers_mock.json')
@@ -248,11 +243,6 @@ def test_gettimegrid_mock(self):
248243
self.assertEqual(t2_raw['endTime'], t2[1].strftime('%H%M'))
249244

250245

251-
252-
253-
254-
255-
256246
class WebUntisRemoteTests(unittest.TestCase, WebUntisTests):
257247
def setUp(self):
258248
self.session = webuntis.session.Session(
@@ -326,7 +316,6 @@ def test_getteachers(self):
326316
def test_gettimeunits(self):
327317
self.session.timeunits()
328318

329-
330319
def test_gettimetables(self):
331320
print('TEST_GETTIMETABLES')
332321
timetables = []
@@ -382,7 +371,6 @@ def load(test):
382371

383372
tests = [WebUntisOfflineTests, WebUntisRemoteTests]
384373

385-
386374
if len(sys.argv) == 1:
387375
print('ERROR: No tests specified.\n\nAdd a number to the command-line arguments to execute the test:')
388376
for i, test in enumerate(tests):

‎webuntis/utils/__init__.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212

1313
OptionStore = option_utils.OptionStore
1414

15+
1516
class lazyproperty(object):
1617
'''A read-only @property that is only evaluated once.
17-
18+
1819
Stolen from http://www.reddit.com/r/Python/comments/ejp25/cached_property_decorator_that_is_memory_friendly/
1920
'''
2021
def __init__(self, fget, doc=None):

‎webuntis/utils/option_utils.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ def __init__(self, value=None):
105105
# A bit weird, but it formats kinda nicely in the log.
106106
# I am not logging line each, because other threads might
107107
# interfere this and fuck everything up.
108-
logging.warning('''You specified that the API endpoint should be /. That is
109-
uncommon. If you didn't mean to do so, remove the slash at
108+
logging.warning('''You specified that the API endpoint
109+
should be /. That is uncommon. If you didn't mean to do so, remove the slash at
110110
the end of your "server" parameter.''')
111111

112112
self.value = {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL