fix: update variable name for clarity in semaphore creation

This commit is contained in:
JRoot Junior 2025-04-10 04:08:36 +03:00
parent 23b9e441d7
commit cd450f5024
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2
2 changed files with 2 additions and 2 deletions

View file

@ -364,7 +364,7 @@ class Dispatcher(Router):
"Run polling for bot @%s id=%d - %r", user.username, bot.id, user.full_name
)
# Create a semaphore if concurrent_updates_limit is specified
# Create semaphore if tasks_concurrency_limit is specified
semaphore = None
if tasks_concurrency_limit is not None and handle_as_tasks:
semaphore = asyncio.Semaphore(tasks_concurrency_limit)

View file

@ -810,7 +810,7 @@ class TestDispatcher:
tasks_concurrency_limit: int,
should_create_semaphore: bool,
):
"""Test that semaphore is created only when handle_as_tasks=True and concurrent_updates_limit is not None"""
"""Test that semaphore is created only when handle_as_tasks=True and tasks_concurrency_limit is not None"""
dispatcher = Dispatcher()
async def _mock_updates(*_):