Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 25, 2023
1 parent 7506c95 commit 6bd5d6d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion tgintegration/botcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ async def _iter_bot_results(
) -> AsyncGenerator[InlineResult, None]:
num_returned: int = 0
while num_returned <= limit:

for result in bot_results.results:
yield InlineResult(self, result, bot_results.query_id)
num_returned += 1
Expand Down
1 change: 0 additions & 1 deletion tgintegration/containers/inlineresults.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def find_results(
message_pattern=None,
url_pattern=None,
) -> Set[InlineResult]:

# TODO:
# article_types: List[str] = None,

Expand Down
3 changes: 1 addition & 2 deletions tgintegration/update_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ async def record_message(self, _, message: Message):
async with self._lock:
message.exact_timestamp = time.time()
self.messages.append(message)
for (pred, ev) in self._event_conditions:
for pred, ev in self._event_conditions:
if pred(self.messages):
ev.set()

async def wait_until(self, predicate: Callable[[List[Message]], bool]):

async with self._lock:
if predicate(self.messages):
return
Expand Down

0 comments on commit 6bd5d6d

Please sign in to comment.