Skip to content

Commit 7edc143

Browse files
committed
fix type import
1 parent fd6379c commit 7edc143

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

examples/advanced/busy-bot.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
1-
"""doc"""
2-
# pylint: disable=R0801
1+
"""
2+
Python Wechaty - https://github.com/wechaty/python-wechaty
3+
Authors: Huan LI (李卓桓) <https://github.com/huan>
4+
Jingjing WU (吴京京) <https://github.com/wj-Mcat>
5+
2020 @ Copyright Wechaty Contributors <https://github.com/wechaty>
6+
Licensed under the Apache License, Version 2.0 (the 'License');
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an 'AS IS' BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
"""
316
import asyncio
417
import logging
518
from typing import Optional
619

20+
# waiting for wechaty-puppet new version
721
from wechaty_puppet import ScanStatus # type: ignore
822

9-
from wechaty import Wechaty, Contact
10-
from wechaty.user import Message
23+
from wechaty import (
24+
Wechaty, Contact, Message
25+
)
1126

1227
logging.basicConfig(level=logging.INFO)
1328
log = logging.getLogger(__name__)
@@ -62,7 +77,6 @@ async def on_scan(self, status: ScanStatus, qr_code: Optional[str] = None,
6277

6378
async def main():
6479
"""doc"""
65-
# pylint: disable=W0603
6680
global bot
6781
bot = MyBot()
6882
await bot.start()

examples/advanced/friendship-bot.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
"""
1616
import os
1717
import asyncio
18-
from typing import Optional, Union
18+
from typing import Optional
1919

20-
from wechaty import Wechaty, Contact, Room, Friendship, FriendshipType
20+
from wechaty import (
21+
Wechaty, Contact, Friendship, FriendshipType
22+
)
2123

2224

2325
class MyBot(Wechaty):

0 commit comments

Comments
 (0)