mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 15:17:00 +01:00
Fix Dependency Warning Typo (#3474)
This commit is contained in:
parent
6b59365464
commit
3507cb13e6
4 changed files with 4 additions and 4 deletions
|
@ -351,7 +351,7 @@ class Application(Generic[BT, CCT, UD, CD, BD, JQ], AbstractAsyncContextManager)
|
||||||
if self._job_queue is None:
|
if self._job_queue is None:
|
||||||
warn(
|
warn(
|
||||||
"No `JobQueue` set up. To use `JobQueue`, you must install PTB via "
|
"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,
|
stacklevel=2,
|
||||||
)
|
)
|
||||||
return self._job_queue
|
return self._job_queue
|
||||||
|
|
|
@ -386,7 +386,7 @@ class CallbackContext(Generic[BT, UD, CD, BD]):
|
||||||
if self._application._job_queue is None: # pylint: disable=protected-access
|
if self._application._job_queue is None: # pylint: disable=protected-access
|
||||||
warn(
|
warn(
|
||||||
"No `JobQueue` set up. To use `JobQueue`, you must install PTB via "
|
"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,
|
stacklevel=2,
|
||||||
)
|
)
|
||||||
return self._application._job_queue # pylint: disable=protected-access
|
return self._application._job_queue # pylint: disable=protected-access
|
||||||
|
|
|
@ -204,7 +204,7 @@ class TestApplication:
|
||||||
def test_job_queue(self, bot, app, recwarn):
|
def test_job_queue(self, bot, app, recwarn):
|
||||||
expected_warning = (
|
expected_warning = (
|
||||||
"No `JobQueue` set up. To use `JobQueue`, you must install PTB via "
|
"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
|
assert app.job_queue is app._job_queue
|
||||||
application = ApplicationBuilder().token(bot.token).job_queue(None).build()
|
application = ApplicationBuilder().token(bot.token).job_queue(None).build()
|
||||||
|
|
|
@ -61,7 +61,7 @@ class TestCallbackContext:
|
||||||
def test_job_queue(self, bot, app, recwarn):
|
def test_job_queue(self, bot, app, recwarn):
|
||||||
expected_warning = (
|
expected_warning = (
|
||||||
"No `JobQueue` set up. To use `JobQueue`, you must install PTB via "
|
"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)
|
callback_context = CallbackContext(app)
|
||||||
|
|
Loading…
Reference in a new issue