Skip to content

Commit 66e608a

Browse files
committed
Improve import order and docstring
1 parent a264e8a commit 66e608a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pubsub/pubsub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def get_followers(user: User) -> List[User]:
6666
def get_followed(user: User) -> List[User]:
6767
return sorted(following[user])
6868

69-
def search(phrase:str, limit: Optional[int] = None) -> List[Post]:
69+
def search(phrase: str, limit: Optional[int] = None) -> List[Post]:
7070
if hashtag_pattern.match(phrase):
7171
return list(islice(hashtag_index[phrase], limit))
7272
return list(islice((post for post in posts if phrase in post.text), limit))

pubsub/session.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
'Sample data to test the pubsub pubsub'
1+
'Sample data for pubsub'
22

3-
from pubsub import set_user, post_message, follow
43
from pprint import pprint
54
from time import time
5+
from pubsub import set_user, post_message, follow
66

77
set_user('raymondh', displayname='Raymond Hettinger', password='superman123',
88
email='[email protected]', bio='Former fashion photographer', photo='raymond.jpg')

pubsub/webapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from typing import Dict
2+
import secrets
23
from bottle import get, run, post, view, abort
34
from bottle import response, request, static_file, template
45
import pubsub
56
import pubsub as comb
6-
import secrets
77
import session
88

99
secret = 'the life expectancy of a lannister stark or targaryen is short'

0 commit comments

Comments
 (0)