Skip to content

Commit

Permalink
style: format with new version of yapf
Browse files Browse the repository at this point in the history
  • Loading branch information
helloqiu committed May 27, 2019
1 parent 1bf4dde commit 15f4431
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
22 changes: 8 additions & 14 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,14 @@ class TestClientMenuClass(BaseTestClass):
"type": "click",
"name": u"歌手简介",
"key": "V1001_TODAY_SINGER"
},
{
}, {
"name": u"菜单",
"sub_button": [
{
"type": "view",
"name": u"搜索",
"url": "http://www.soso.com/"
},
{
}, {
"type": "view",
"name": u"视频",
"url": "http://v.qq.com/"
Expand Down Expand Up @@ -543,16 +541,14 @@ class TestClientCustomMenuClass(BaseTestClass):
"type": "click",
"name": u"今日歌曲",
"key": "V1001_TODAY_MUSIC"
},
{
}, {
"name": u"菜单",
"sub_button": [
{
"type": "view",
"name": u"搜索",
"url": "http://www.soso.com/"
},
{
}, {
"type": "view",
"name": u"视频",
"url": "http://v.qq.com/"
Expand Down Expand Up @@ -1544,12 +1540,10 @@ def create_tag_callback(self, request):
body = json.loads(request.body.decode("utf-8"))
assert body == {"tag": {"name": self.create_tag_name}}
return 200, JSON_HEADER, json.dumps(
{
"tag": {
"id": self.create_tag_id,
"name": self.create_tag_name
}
}
{"tag": {
"id": self.create_tag_id,
"name": self.create_tag_name
}}
)

def update_tag_callback(self, request):
Expand Down
4 changes: 2 additions & 2 deletions werobot/messages/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def __init__(self, message):
else:
self.pic_list.append(
{
'pic_md5_sum': message['SendPicsInfo']['PicList'].
pop('item')['PicMd5Sum']
'pic_md5_sum': message['SendPicsInfo']
['PicList'].pop('item')['PicMd5Sum']
}
)

Expand Down
4 changes: 1 addition & 3 deletions werobot/session/mongodbstorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ def set(self, id, value):
"""
session = json_dumps(value)
self.collection.replace_one(
{
"wechat_id": id
}, {
{"wechat_id": id}, {
"wechat_id": id,
"session": session
},
Expand Down

0 comments on commit 15f4431

Please sign in to comment.