mirror of
https://github.com/paul-nameless/tg
synced 2025-02-16 10:38:23 +00:00
add ci mypy config
This commit is contained in:
parent
0f59652b1b
commit
83ef16ad73
4 changed files with 7 additions and 8 deletions
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
|
@ -30,11 +30,14 @@ jobs:
|
|||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install black
|
||||
- name: Install tools
|
||||
run: |
|
||||
pip install black==19.10b0
|
||||
pip install black==19.10b0 mypy==0.770
|
||||
|
||||
- name: Check formatting with black
|
||||
run: |
|
||||
black --check .
|
||||
black --check tg
|
||||
|
||||
- name: Check types with mypy
|
||||
run: |
|
||||
mypy tg
|
||||
|
|
|
@ -53,7 +53,7 @@ class Controller:
|
|||
"updateChatIsMarkedAsUnread": self.update_chat_marked_as_unread,
|
||||
"updateChatIsPinned": self.update_chat_is_pinned,
|
||||
"updateChatLastMessage": self.update_chat_last_msg,
|
||||
"updateChatNotificationSettings": self.update_chat_notification_settings, # noqa
|
||||
"updateChatNotificationSettings": self.update_chat_notification_settings, # noqa
|
||||
"updateChatOrder": self.update_chat_order,
|
||||
"updateChatReadInbox": self.update_chat_read_inbox,
|
||||
"updateChatTitle": self.update_chat_title,
|
||||
|
|
|
@ -323,8 +323,6 @@ class MsgModel:
|
|||
log.info(f"message has been sent: {result.update}")
|
||||
|
||||
def delete_msg(self, chat_id: int) -> bool:
|
||||
if chat_id is None:
|
||||
return False
|
||||
selected_msg = self.current_msgs[chat_id]
|
||||
msg_item = self.msgs[chat_id].pop(selected_msg)
|
||||
self.current_msgs[chat_id] = min(
|
||||
|
|
|
@ -255,8 +255,6 @@ class MsgView:
|
|||
selected_item_idx = None
|
||||
collected_items: List[Tuple[Tuple[str, ...], bool, int]] = []
|
||||
for ignore_before in range(len(msgs)):
|
||||
if selected_item_idx is not None:
|
||||
break
|
||||
collected_items = []
|
||||
line_num = self.h
|
||||
for msg_idx, msg_item in msgs[ignore_before:]:
|
||||
|
|
Loading…
Add table
Reference in a new issue