diff --git a/tgintegration/botcontroller.py b/tgintegration/botcontroller.py index 7d1fc2f..7525f26 100644 --- a/tgintegration/botcontroller.py +++ b/tgintegration/botcontroller.py @@ -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 diff --git a/tgintegration/containers/inlineresults.py b/tgintegration/containers/inlineresults.py index c7f8cb6..c817a4c 100644 --- a/tgintegration/containers/inlineresults.py +++ b/tgintegration/containers/inlineresults.py @@ -131,7 +131,6 @@ def find_results( message_pattern=None, url_pattern=None, ) -> Set[InlineResult]: - # TODO: # article_types: List[str] = None, diff --git a/tgintegration/update_recorder.py b/tgintegration/update_recorder.py index 96fdfe8..a843277 100644 --- a/tgintegration/update_recorder.py +++ b/tgintegration/update_recorder.py @@ -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