Fixed flake8
This commit is contained in:
parent
78eedc51de
commit
94917d0b98
|
@ -36,9 +36,9 @@ class Database:
|
||||||
Column("user_id", String(255), nullable=False),
|
Column("user_id", String(255), nullable=False),
|
||||||
Column("size", String(255), nullable=False),)
|
Column("size", String(255), nullable=False),)
|
||||||
self.tmdb_messages = Table("tmdb_messages", meta,
|
self.tmdb_messages = Table("tmdb_messages", meta,
|
||||||
Column("timestamp", Float, primary_key=True),
|
Column("timestamp", Float, primary_key=True),
|
||||||
Column("event_id", String(64), nullable=False),
|
Column("event_id", String(64), nullable=False),
|
||||||
Column("result_json", String(255), nullable=False),)
|
Column("result_json", String(255), nullable=False),)
|
||||||
meta.create_all(db)
|
meta.create_all(db)
|
||||||
|
|
||||||
def set_message(self, event_id, result_json):
|
def set_message(self, event_id, result_json):
|
||||||
|
|
|
@ -60,7 +60,7 @@ class TmdbBot(Plugin):
|
||||||
self.db = Database(self.database)
|
self.db = Database(self.database)
|
||||||
self.api = None
|
self.api = None
|
||||||
|
|
||||||
async def send_html_message(self, evt: MessageEvent, text_message: str, html_message: str, data = None) -> None:
|
async def send_html_message(self, evt: MessageEvent, text_message: str, html_message: str, data=None) -> None:
|
||||||
content = TextMessageEventContent(
|
content = TextMessageEventContent(
|
||||||
msgtype=MessageType.TEXT, format=Format.HTML,
|
msgtype=MessageType.TEXT, format=Format.HTML,
|
||||||
body=f"{text_message}",
|
body=f"{text_message}",
|
||||||
|
@ -291,6 +291,6 @@ class TmdbBot(Plugin):
|
||||||
await self.api.search_id(populars[str(requ)])
|
await self.api.search_id(populars[str(requ)])
|
||||||
await self.send_movie_info(evt, self.api)
|
await self.send_movie_info(evt, self.api)
|
||||||
else:
|
else:
|
||||||
self.log.info(f"Not in reply to a known message")
|
self.log.info("Not in reply to a known message")
|
||||||
else:
|
else:
|
||||||
self.log.info(f"No reply")
|
self.log.info("No reply")
|
||||||
|
|
|
@ -175,8 +175,8 @@ class Movie(TmdbApiSingle):
|
||||||
async def search_id(self, id):
|
async def search_id(self, id):
|
||||||
await self.query_details(id)
|
await self.query_details(id)
|
||||||
await asyncio.gather(
|
await asyncio.gather(
|
||||||
self.query_cast(id),
|
self.query_cast(id),
|
||||||
self.query_image_binary())
|
self.query_image_binary())
|
||||||
return id
|
return id
|
||||||
|
|
||||||
async def query_details(self, id):
|
async def query_details(self, id):
|
||||||
|
|
Loading…
Reference in a new issue