Skip to content

Commit 28d4428

Browse files
committed
added code style fixes to conform with PEP8
1 parent 0322d0f commit 28d4428

10 files changed

Lines changed: 2523 additions & 2505 deletions

File tree

twitter/api.py

Lines changed: 212 additions & 212 deletions
Large diffs are not rendered by default.

twitter/direct_message.py

Lines changed: 283 additions & 282 deletions
Large diffs are not rendered by default.

twitter/error.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env python
22

3+
34
class TwitterError(Exception):
4-
'''Base class for Twitter errors'''
5+
"""Base class for Twitter errors"""
56

6-
@property
7-
def message(self):
8-
'''Returns the first argument used to construct this error.'''
9-
return self.args[0]
7+
@property
8+
def message(self):
9+
'''Returns the first argument used to construct this error.'''
10+
return self.args[0]

twitter/hashtag.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
#!/usr/bin/env python
22

3-
from twitter import TwitterError
43

54
class Hashtag(object):
6-
''' A class representing a twitter hashtag
7-
'''
8-
def __init__(self,
9-
text=None):
10-
self.text = text
5+
""" A class representing a twitter hashtag """
116

12-
@staticmethod
13-
def NewFromJsonDict(data):
14-
'''Create a new instance based on a JSON dict.
7+
def __init__(self,
8+
text=None):
9+
self.text = text
1510

16-
Args:
17-
data:
18-
A JSON dict, as converted from the JSON in the twitter API
11+
@staticmethod
12+
def NewFromJsonDict(data):
13+
"""Create a new instance based on a JSON dict.
1914
20-
Returns:
21-
A twitter.Hashtag instance
22-
'''
23-
return Hashtag(text=data.get('text', None))
15+
Args:
16+
data:
17+
A JSON dict, as converted from the JSON in the twitter API
18+
19+
Returns:
20+
A twitter.Hashtag instance
21+
"""
22+
return Hashtag(text=data.get('text', None))

0 commit comments

Comments
 (0)