Fix Dependency Warning Typo (#3474)

This commit is contained in:
Aditya 2023-01-03 23:20:06 +05:30 committed by GitHub
parent 6b59365464
commit 3507cb13e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -351,7 +351,7 @@ class Application(Generic[BT, CCT, UD, CD, BD, JQ], AbstractAsyncContextManager)
if self._job_queue is None:
warn(
"No `JobQueue` set up. To use `JobQueue`, you must install PTB via "
"`pip install python-telegram-bot[job_queue]`.",
"`pip install python-telegram-bot[job-queue]`.",
stacklevel=2,
)
return self._job_queue

View file

@ -386,7 +386,7 @@ class CallbackContext(Generic[BT, UD, CD, BD]):
if self._application._job_queue is None: # pylint: disable=protected-access
warn(
"No `JobQueue` set up. To use `JobQueue`, you must install PTB via "
"`pip install python-telegram-bot[job_queue]`.",
"`pip install python-telegram-bot[job-queue]`.",
stacklevel=2,
)
return self._application._job_queue # pylint: disable=protected-access

View file

@ -204,7 +204,7 @@ class TestApplication:
def test_job_queue(self, bot, app, recwarn):
expected_warning = (
"No `JobQueue` set up. To use `JobQueue`, you must install PTB via "
"`pip install python-telegram-bot[job_queue]`."
"`pip install python-telegram-bot[job-queue]`."
)
assert app.job_queue is app._job_queue
application = ApplicationBuilder().token(bot.token).job_queue(None).build()

View file

@ -61,7 +61,7 @@ class TestCallbackContext:
def test_job_queue(self, bot, app, recwarn):
expected_warning = (
"No `JobQueue` set up. To use `JobQueue`, you must install PTB via "
"`pip install python-telegram-bot[job_queue]`."
"`pip install python-telegram-bot[job-queue]`."
)
callback_context = CallbackContext(app)