Skip to content

Commit b004e16

Browse files
author
Pietro Albini
committed
Fix a bunch of lint issues
1 parent 3b53b92 commit b004e16

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

botogram/frozenbot.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"""
88

99
import logbook
10-
import inspect
1110

1211
from . import utils
1312
from . import objects
@@ -133,7 +132,7 @@ def _edit_create_fake_message_object(self, chat, message):
133132
"""Helper method for edit_message and edit_caption"""
134133
# Also accept objects
135134
if hasattr(message, "message_id"):
136-
message = message_id
135+
message = message.message_id
137136
if hasattr(chat, "id"):
138137
chat = chat.id
139138

botogram/objects/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
Released under the MIT license
77
"""
88

9+
# flake8: noqa
10+
911
from .chats import User, Chat, UserProfilePhotos
1012
from .media import PhotoSize, Photo, Audio, Voice, Document, Sticker, \
1113
Video, Contact, Location

botogram/objects/media.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def __init__(self, data, api=None):
5656
self.biggest = with_size[max(with_size.keys())]
5757

5858
# Publish all the attributes of the biggest-size photo
59-
attrs = list(PhotoSize.required.keys()) + list(PhotoSize.optional.keys())
59+
attrs = list(PhotoSize.required.keys())
60+
attrs += list(PhotoSize.optional.keys())
6061
for attr in attrs:
6162
setattr(self, attr, getattr(self.biggest, attr))
6263

botogram/objects/messages.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from .chats import User, Chat
1515
from .media import Audio, Voice, Document, Photo, Sticker, Video, Contact, \
16-
Location
16+
Location
1717

1818

1919
def _require_message(func):
@@ -148,6 +148,7 @@ def url(self):
148148
# Sorry!
149149
return None
150150

151+
151152
class ParsedText:
152153
"""Collection of ParsedTextEntity.
153154

botogram/objects/mixins.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"""
88

99
import importlib
10-
import types
1110
import json
1211

1312
from .. import utils

botogram/runner/processes.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@
1010
import os
1111
import traceback
1212
import queue
13-
import time
1413
import signal
1514

1615
import logbook
1716

1817
from . import jobs
1918
from . import shared
2019
from . import ipc
21-
from .. import objects
2220
from .. import api
2321
from .. import updates as updates_module
2422

botogram/updates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def fetch(self, timeout=1):
3737
"offset": self._last_id + 1,
3838
"timeout": timeout,
3939
}, expect=objects.Updates)
40-
except ValueError as e:
40+
except ValueError:
4141
raise FetchError("Got an invalid response from Telegram!")
4242

4343
# If there are no updates just ignore this block

0 commit comments

Comments
 (0)