From 7b37f9a6fa1d1e6a6656fb3e03efe228206cfa97 Mon Sep 17 00:00:00 2001 From: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com> Date: Wed, 9 Feb 2022 17:30:16 +0100 Subject: [PATCH] Documentation Improvements (#2856, #2798, #2854, #2841) Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com> --- .github/pull_request_template.md | 1 + .github/workflows/docs.yml | 39 + docs/Makefile | 2 +- docs/requirements-docs.txt | 11 +- docs/source/_static/dark.css | 3461 ----------------- docs/source/_static/style_external_link.css | 5 + docs/source/bot_methods.rst | 304 ++ docs/source/conf.py | 174 +- docs/source/ptb-logo_1024.ico | Bin 0 -> 1150 bytes telegram/_bot.py | 151 +- telegram/_callbackquery.py | 8 +- telegram/_chat.py | 6 +- telegram/_chatmemberupdated.py | 6 +- telegram/_choseninlineresult.py | 2 +- telegram/_files/file.py | 30 +- telegram/_files/inputfile.py | 2 +- telegram/_files/inputmedia.py | 24 +- telegram/_files/sticker.py | 2 +- telegram/_inline/inlinekeyboardbutton.py | 8 +- telegram/_inline/inlinequery.py | 8 +- telegram/_inline/inlinequeryresultaudio.py | 4 +- .../_inline/inlinequeryresultcachedaudio.py | 4 +- .../inlinequeryresultcacheddocument.py | 4 +- .../_inline/inlinequeryresultcachedgif.py | 4 +- .../inlinequeryresultcachedmpeg4gif.py | 4 +- .../_inline/inlinequeryresultcachedphoto.py | 4 +- .../_inline/inlinequeryresultcachedvideo.py | 4 +- .../_inline/inlinequeryresultcachedvoice.py | 4 +- telegram/_inline/inlinequeryresultdocument.py | 4 +- telegram/_inline/inlinequeryresultgif.py | 4 +- telegram/_inline/inlinequeryresultmpeg4gif.py | 4 +- telegram/_inline/inlinequeryresultphoto.py | 4 +- telegram/_inline/inlinequeryresultvideo.py | 4 +- telegram/_inline/inlinequeryresultvoice.py | 4 +- telegram/_inline/inputtextmessagecontent.py | 4 +- telegram/_message.py | 10 +- telegram/_passport/credentials.py | 4 +- .../_passport/encryptedpassportelement.py | 4 +- telegram/_passport/passportdata.py | 8 +- telegram/_passport/passportelementerrors.py | 36 +- telegram/_payment/invoice.py | 4 +- telegram/_payment/labeledprice.py | 2 +- telegram/_payment/precheckoutquery.py | 4 +- telegram/_payment/shippingaddress.py | 2 +- telegram/_payment/shippingquery.py | 2 +- telegram/_payment/successfulpayment.py | 2 +- telegram/_poll.py | 2 +- telegram/_user.py | 6 +- telegram/_utils/defaultvalue.py | 4 +- telegram/_utils/files.py | 2 +- telegram/constants.py | 122 +- telegram/ext/_basepersistence.py | 55 +- telegram/ext/_builders.py | 37 +- telegram/ext/_callbackcontext.py | 5 +- telegram/ext/_callbackdatacache.py | 12 +- telegram/ext/_callbackqueryhandler.py | 18 +- telegram/ext/_chatjoinrequesthandler.py | 2 +- telegram/ext/_chatmemberhandler.py | 2 +- telegram/ext/_choseninlineresulthandler.py | 5 +- telegram/ext/_commandhandler.py | 12 +- telegram/ext/_contexttypes.py | 6 + telegram/ext/_defaults.py | 2 +- telegram/ext/_dictpersistence.py | 15 +- telegram/ext/_dispatcher.py | 18 +- telegram/ext/_extbot.py | 2 +- telegram/ext/_handler.py | 8 +- telegram/ext/_inlinequeryhandler.py | 12 +- telegram/ext/_jobqueue.py | 13 +- telegram/ext/_messagehandler.py | 8 +- telegram/ext/_picklepersistence.py | 17 +- telegram/ext/_pollanswerhandler.py | 2 +- telegram/ext/_pollhandler.py | 2 +- telegram/ext/_precheckoutqueryhandler.py | 2 +- telegram/ext/_shippingqueryhandler.py | 2 +- telegram/ext/_stringcommandhandler.py | 2 +- telegram/ext/_stringregexhandler.py | 10 +- telegram/ext/_typehandler.py | 2 +- telegram/ext/_updater.py | 18 +- telegram/ext/_utils/types.py | 2 +- telegram/ext/filters.py | 18 +- telegram/request.py | 2 +- 81 files changed, 960 insertions(+), 3869 deletions(-) create mode 100644 .github/workflows/docs.yml delete mode 100644 docs/source/_static/dark.css create mode 100644 docs/source/_static/style_external_link.css create mode 100644 docs/source/bot_methods.rst create mode 100644 docs/source/ptb-logo_1024.ico diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ca3b7bf4f..f257c1ae8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -32,5 +32,6 @@ Hey! You're PRing? Cool! Please have a look at the below checklist. It's here to - [ ] Add the handlers to the warning loop in the `ConversationHandler` - [ ] Added new filters for new message (sub)types - [ ] Added or updated documentation for the changed class(es) and/or method(s) + - [ ] Added or updated `bot_methods.rst` - [ ] Updated the Bot API version number in all places: `README.rst` and `README_RAW.rst` (including the badge), as well as `telegram.constants.BOT_API_VERSION` - [ ] Added logic for arbitrary callback data in `tg.ext.Bot` for new methods that either accept a `reply_markup` in some form or have a return type that is/contains `telegram.Message` diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..fcc46186e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,39 @@ +name: Test Documentation Build +on: + pull_request: + branches: + - master + - v14 + - doc-fixes + push: + branches: + - master + - v14 + - doc-fixes + +jobs: + test-sphinx-build: + name: test-sphinx-build + runs-on: ${{matrix.os}} + strategy: + matrix: + python-version: [3.7] + os: [ubuntu-latest] + fail-fast: False + steps: + - uses: actions/checkout@v2 + - name: Initialize vendored libs + run: + git submodule update --init --recursive + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -W ignore -m pip install --upgrade pip + python -W ignore -m pip install -r requirements.txt + python -W ignore -m pip install -r requirements-dev.txt + python -W ignore -m pip install -r docs/requirements-docs.txt + - name: Build docs + run: sphinx-build docs/source docs/build/html -W --keep-going -j auto diff --git a/docs/Makefile b/docs/Makefile index a336401c7..42da80011 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -15,7 +15,7 @@ endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -j auto # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 7c297765d..330699858 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,6 +1,7 @@ -sphinx==4.2.0 +sphinx==4.4.0 sphinx-pypi-upload -# When bumping this, make sure to rebuild the dark-mode CSS -# More instructions at source/_static/dark.css -# Ofc once https://github.com/readthedocs/sphinx_rtd_theme/issues/224 is closed, we should use that -sphinx_rtd_theme==0.5.2 +furo==2022.1.2 +# Can be replaced with a sphinx-paramlinks==... dependency once a version is released that +# includes the commit mentioned below and maybe even +# https://github.com/sqlalchemyorg/sphinx-paramlinks/pull/14 +git+https://github.com/sqlalchemyorg/sphinx-paramlinks.git@acedb03149e3f87ff599174b033754c2f58f1c95 \ No newline at end of file diff --git a/docs/source/_static/dark.css b/docs/source/_static/dark.css deleted file mode 100644 index 8be80d0cc..000000000 --- a/docs/source/_static/dark.css +++ /dev/null @@ -1,3461 +0,0 @@ -@media (prefers-color-scheme: dark) { - /* - Generated by https://darkreader.org - Instructions: Install the extension on a Chromium-based browser - Then do this to export the CSS: https://github.com/darkreader/darkreader/issues/604#issuecomment-661107893 and drop it here - Some color values where manually changed - just search for "/*" in this file and insert them in the new css - */ - /* User-Agent Style */ - html { - background-color: #181a1b !important; - } - html, body, input, textarea, select, button { - background-color: #181a1b; - } - html, body, input, textarea, select, button { - border-color: #736b5e; - color: #e8e6e3; - } - a { - color: #3391ff; - } - table { - border-color: #545b5e; - } - ::placeholder { - color: #b2aba1; - } - input:-webkit-autofill, - textarea:-webkit-autofill, - select:-webkit-autofill { - background-color: #555b00 !important; - color: #e8e6e3 !important; - } - ::-webkit-scrollbar { - background-color: #202324; - color: #aba499; - } - ::-webkit-scrollbar-thumb { - background-color: #454a4d; - } - ::-webkit-scrollbar-thumb:hover { - background-color: #575e62; - } - ::-webkit-scrollbar-thumb:active { - background-color: #484e51; - } - ::-webkit-scrollbar-corner { - background-color: #181a1b; - } - ::selection { - background-color: #004daa !important; - color: #e8e6e3 !important; - } - ::-moz-selection { - background-color: #004daa !important; - color: #e8e6e3 !important; - } - - /* Invert Style */ - .jfk-bubble.gtx-bubble, .captcheck_answer_label > input + img, span#closed_text > img[src^="https://www.gstatic.com/images/branding/googlelogo"], span[data-href^="https://www.hcaptcha.com/"] > #icon, #bit-notification-bar-iframe, embed[type="application/pdf"] { - filter: invert(100%) hue-rotate(180deg) contrast(90%) !important; - } - - /* Variables Style */ - :root { - --darkreader-neutral-background: #131516; - --darkreader-neutral-text: #d8d4cf; - --darkreader-selection-background: #004daa; - --darkreader-selection-text: #e8e6e3; - } - - /* Modified CSS */ - a:active, - a:hover { - outline-color: initial; - } - abbr[title] { - border-bottom-color: initial; - } - ins { - background-image: initial; - background-color: rgb(112, 112, 0); - text-decoration-color: initial; - } - ins, - mark { - color: rgb(232, 230, 227); - } - mark { - background-image: initial; - background-color: rgb(204, 204, 0); - } - dl, - ol, - ul { - list-style-image: none; - } - li { - list-style-image: initial; - } - img { - border-color: initial; - } - .chromeframe { - background-image: initial; - background-color: rgb(53, 57, 59); - color: rgb(232, 230, 227); - } - .ir { - border-color: initial; - background-color: transparent; - } - .visuallyhidden { - border-color: initial; - } - .fa-border { - border-color: rgb(53, 57, 59); - } - .fa-inverse { - color: rgb(232, 230, 227); - } - .sr-only { - border-color: initial; - } - .fa::before, - .icon::before, - .rst-content .admonition-title::before, - .rst-content .code-block-caption .headerlink::before, - .rst-content code.download span:first-child::before, - .rst-content dl dt .headerlink::before, - .rst-content h1 .headerlink::before, - .rst-content h2 .headerlink::before, - .rst-content h3 .headerlink::before, - .rst-content h4 .headerlink::before, - .rst-content h5 .headerlink::before, - .rst-content h6 .headerlink::before, - .rst-content p.caption .headerlink::before, - .rst-content table > caption .headerlink::before, - .rst-content tt.download span:first-child::before, - .wy-dropdown .caret::before, - .wy-inline-validate.wy-inline-validate-danger .wy-input-context::before, - .wy-inline-validate.wy-inline-validate-info .wy-input-context::before, - .wy-inline-validate.wy-inline-validate-success .wy-input-context::before, - .wy-inline-validate.wy-inline-validate-warning .wy-input-context::before, - .wy-menu-vertical li.current > a span.toctree-expand::before, - .wy-menu-vertical li.on a span.toctree-expand::before, - .wy-menu-vertical li span.toctree-expand::before { - text-decoration-color: inherit; - } - .rst-content .code-block-caption a .headerlink, - .rst-content a .admonition-title, - .rst-content code.download a span:first-child, - .rst-content dl dt a .headerlink, - .rst-content h1 a .headerlink, - .rst-content h2 a .headerlink, - .rst-content h3 a .headerlink, - .rst-content h4 a .headerlink, - .rst-content h5 a .headerlink, - .rst-content h6 a .headerlink, - .rst-content p.caption a .headerlink, - .rst-content table > caption a .headerlink, - .rst-content tt.download a span:first-child, - .wy-menu-vertical li.current > a span.toctree-expand, - .wy-menu-vertical li.on a span.toctree-expand, - .wy-menu-vertical li a span.toctree-expand, - a .fa, - a .icon, - a .rst-content .admonition-title, - a .rst-content .code-block-caption .headerlink, - a .rst-content code.download span:first-child, - a .rst-content dl dt .headerlink, - a .rst-content h1 .headerlink, - a .rst-content h2 .headerlink, - a .rst-content h3 .headerlink, - a .rst-content h4 .headerlink, - a .rst-content h5 .headerlink, - a .rst-content h6 .headerlink, - a .rst-content p.caption .headerlink, - a .rst-content table > caption .headerlink, - a .rst-content tt.download span:first-child, - a .wy-menu-vertical li span.toctree-expand { - text-decoration-color: inherit; - } - .rst-content .admonition, - .rst-content .admonition-todo, - .rst-content .attention, - .rst-content .caution, - .rst-content .danger, - .rst-content .error, - .rst-content .hint, - .rst-content .important, - .rst-content .note, - .rst-content .seealso, - .rst-content .tip, - .rst-content .warning, - .wy-alert { - background-image: initial; - background-color: rgb(32, 35, 36); - } - .rst-content .admonition-title, - .wy-alert-title { - color: rgb(232, 230, 227); - background-image: initial; - background-color: rgb(29, 91, 131); - } - .rst-content .danger, - .rst-content .error, - .rst-content .wy-alert-danger.admonition, - .rst-content .wy-alert-danger.admonition-todo, - .rst-content .wy-alert-danger.attention, - .rst-content .wy-alert-danger.caution, - .rst-content .wy-alert-danger.hint, - .rst-content .wy-alert-danger.important, - .rst-content .wy-alert-danger.note, - .rst-content .wy-alert-danger.seealso, - .rst-content .wy-alert-danger.tip, - .rst-content .wy-alert-danger.warning, - .wy-alert.wy-alert-danger { - background-image: initial; - background-color: rgb(52, 12, 8); - } - .rst-content .danger .admonition-title, - .rst-content .danger .wy-alert-title, - .rst-content .error .admonition-title, - .rst-content .error .wy-alert-title, - .rst-content .wy-alert-danger.admonition-todo .admonition-title, - .rst-content .wy-alert-danger.admonition-todo .wy-alert-title, - .rst-content .wy-alert-danger.admonition .admonition-title, - .rst-content .wy-alert-danger.admonition .wy-alert-title, - .rst-content .wy-alert-danger.attention .admonition-title, - .rst-content .wy-alert-danger.attention .wy-alert-title, - .rst-content .wy-alert-danger.caution .admonition-title, - .rst-content .wy-alert-danger.caution .wy-alert-title, - .rst-content .wy-alert-danger.hint .admonition-title, - .rst-content .wy-alert-danger.hint .wy-alert-title, - .rst-content .wy-alert-danger.important .admonition-title, - .rst-content .wy-alert-danger.important .wy-alert-title, - .rst-content .wy-alert-danger.note .admonition-title, - .rst-content .wy-alert-danger.note .wy-alert-title, - .rst-content .wy-alert-danger.seealso .admonition-title, - .rst-content .wy-alert-danger.seealso .wy-alert-title, - .rst-content .wy-alert-danger.tip .admonition-title, - .rst-content .wy-alert-danger.tip .wy-alert-title, - .rst-content .wy-alert-danger.warning .admonition-title, - .rst-content .wy-alert-danger.warning .wy-alert-title, - .rst-content .wy-alert.wy-alert-danger .admonition-title, - .wy-alert.wy-alert-danger .rst-content .admonition-title, - .wy-alert.wy-alert-danger .wy-alert-title { - background-image: initial; - background-color: rgb(108, 22, 13); - } - .rst-content .admonition-todo, - .rst-content .attention, - .rst-content .caution, - .rst-content .warning, - .rst-content .wy-alert-warning.admonition, - .rst-content .wy-alert-warning.danger, - .rst-content .wy-alert-warning.error, - .rst-content .wy-alert-warning.hint, - .rst-content .wy-alert-warning.important, - .rst-content .wy-alert-warning.note, - .rst-content .wy-alert-warning.seealso, - .rst-content .wy-alert-warning.tip, - .wy-alert.wy-alert-warning { - background-image: initial; - /* Manually overridden */ - background-color: rgb(37, 33, 30); - /*background-color: rgb(82, 53, 0);*/ - } - .rst-content .admonition-todo .admonition-title, - .rst-content .admonition-todo .wy-alert-title, - .rst-content .attention .admonition-title, - .rst-content .attention .wy-alert-title, - .rst-content .caution .admonition-title, - .rst-content .caution .wy-alert-title, - .rst-content .warning .admonition-title, - .rst-content .warning .wy-alert-title, - .rst-content .wy-alert-warning.admonition .admonition-title, - .rst-content .wy-alert-warning.admonition .wy-alert-title, - .rst-content .wy-alert-warning.danger .admonition-title, - .rst-content .wy-alert-warning.danger .wy-alert-title, - .rst-content .wy-alert-warning.error .admonition-title, - .rst-content .wy-alert-warning.error .wy-alert-title, - .rst-content .wy-alert-warning.hint .admonition-title, - .rst-content .wy-alert-warning.hint .wy-alert-title, - .rst-content .wy-alert-warning.important .admonition-title, - .rst-content .wy-alert-warning.important .wy-alert-title, - .rst-content .wy-alert-warning.note .admonition-title, - .rst-content .wy-alert-warning.note .wy-alert-title, - .rst-content .wy-alert-warning.seealso .admonition-title, - .rst-content .wy-alert-warning.seealso .wy-alert-title, - .rst-content .wy-alert-warning.tip .admonition-title, - .rst-content .wy-alert-warning.tip .wy-alert-title, - .rst-content .wy-alert.wy-alert-warning .admonition-title, - .wy-alert.wy-alert-warning .rst-content .admonition-title, - .wy-alert.wy-alert-warning .wy-alert-title { - background-image: initial; - background-color: rgb(123, 65, 14); - } - .rst-content .note, - .rst-content .seealso, - .rst-content .wy-alert-info.admonition, - .rst-content .wy-alert-info.admonition-todo, - .rst-content .wy-alert-info.attention, - .rst-content .wy-alert-info.caution, - .rst-content .wy-alert-info.danger, - .rst-content .wy-alert-info.error, - .rst-content .wy-alert-info.hint, - .rst-content .wy-alert-info.important, - .rst-content .wy-alert-info.tip, - .rst-content .wy-alert-info.warning, - .wy-alert.wy-alert-info { - background-image: initial; - background-color: rgb(32, 35, 36); - } - .rst-content .note .admonition-title, - .rst-content .note .wy-alert-title, - .rst-content .seealso .admonition-title, - .rst-content .seealso .wy-alert-title, - .rst-content .wy-alert-info.admonition-todo .admonition-title, - .rst-content .wy-alert-info.admonition-todo .wy-alert-title, - .rst-content .wy-alert-info.admonition .admonition-title, - .rst-content .wy-alert-info.admonition .wy-alert-title, - .rst-content .wy-alert-info.attention .admonition-title, - .rst-content .wy-alert-info.attention .wy-alert-title, - .rst-content .wy-alert-info.caution .admonition-title, - .rst-content .wy-alert-info.caution .wy-alert-title, - .rst-content .wy-alert-info.danger .admonition-title, - .rst-content .wy-alert-info.danger .wy-alert-title, - .rst-content .wy-alert-info.error .admonition-title, - .rst-content .wy-alert-info.error .wy-alert-title, - .rst-content .wy-alert-info.hint .admonition-title, - .rst-content .wy-alert-info.hint .wy-alert-title, - .rst-content .wy-alert-info.important .admonition-title, - .rst-content .wy-alert-info.important .wy-alert-title, - .rst-content .wy-alert-info.tip .admonition-title, - .rst-content .wy-alert-info.tip .wy-alert-title, - .rst-content .wy-alert-info.warning .admonition-title, - .rst-content .wy-alert-info.warning .wy-alert-title, - .rst-content .wy-alert.wy-alert-info .admonition-title, - .wy-alert.wy-alert-info .rst-content .admonition-title, - .wy-alert.wy-alert-info .wy-alert-title { - background-image: initial; - background-color: rgb(29, 91, 131); - } - .rst-content .hint, - .rst-content .important, - .rst-content .tip, - .rst-content .wy-alert-success.admonition, - .rst-content .wy-alert-success.admonition-todo, - .rst-content .wy-alert-success.attention, - .rst-content .wy-alert-success.caution, - .rst-content .wy-alert-success.danger, - .rst-content .wy-alert-success.error, - .rst-content .wy-alert-success.note, - .rst-content .wy-alert-success.seealso, - .rst-content .wy-alert-success.warning, - .wy-alert.wy-alert-success { - background-image: initial; - background-color: rgb(9, 66, 58); - } - .rst-content .hint .admonition-title, - .rst-content .hint .wy-alert-title, - .rst-content .important .admonition-title, - .rst-content .important .wy-alert-title, - .rst-content .tip .admonition-title, - .rst-content .tip .wy-alert-title, - .rst-content .wy-alert-success.admonition-todo .admonition-title, - .rst-content .wy-alert-success.admonition-todo .wy-alert-title, - .rst-content .wy-alert-success.admonition .admonition-title, - .rst-content .wy-alert-success.admonition .wy-alert-title, - .rst-content .wy-alert-success.attention .admonition-title, - .rst-content .wy-alert-success.attention .wy-alert-title, - .rst-content .wy-alert-success.caution .admonition-title, - .rst-content .wy-alert-success.caution .wy-alert-title, - .rst-content .wy-alert-success.danger .admonition-title, - .rst-content .wy-alert-success.danger .wy-alert-title, - .rst-content .wy-alert-success.error .admonition-title, - .rst-content .wy-alert-success.error .wy-alert-title, - .rst-content .wy-alert-success.note .admonition-title, - .rst-content .wy-alert-success.note .wy-alert-title, - .rst-content .wy-alert-success.seealso .admonition-title, - .rst-content .wy-alert-success.seealso .wy-alert-title, - .rst-content .wy-alert-success.warning .admonition-title, - .rst-content .wy-alert-success.warning .wy-alert-title, - .rst-content .wy-alert.wy-alert-success .admonition-title, - .wy-alert.wy-alert-success .rst-content .admonition-title, - .wy-alert.wy-alert-success .wy-alert-title { - background-image: initial; - background-color: rgb(21, 150, 125); - } - .rst-content .wy-alert-neutral.admonition, - .rst-content .wy-alert-neutral.admonition-todo, - .rst-content .wy-alert-neutral.attention, - .rst-content .wy-alert-neutral.caution, - .rst-content .wy-alert-neutral.danger, - .rst-content .wy-alert-neutral.error, - .rst-content .wy-alert-neutral.hint, - .rst-content .wy-alert-neutral.important, - .rst-content .wy-alert-neutral.note, - .rst-content .wy-alert-neutral.seealso, - .rst-content .wy-alert-neutral.tip, - .rst-content .wy-alert-neutral.warning, - .wy-alert.wy-alert-neutral { - background-image: initial; - background-color: rgb(27, 36, 36); - } - .rst-content .wy-alert-neutral.admonition-todo .admonition-title, - .rst-content .wy-alert-neutral.admonition-todo .wy-alert-title, - .rst-content .wy-alert-neutral.admonition .admonition-title, - .rst-content .wy-alert-neutral.admonition .wy-alert-title, - .rst-content .wy-alert-neutral.attention .admonition-title, - .rst-content .wy-alert-neutral.attention .wy-alert-title, - .rst-content .wy-alert-neutral.caution .admonition-title, - .rst-content .wy-alert-neutral.caution .wy-alert-title, - .rst-content .wy-alert-neutral.danger .admonition-title, - .rst-content .wy-alert-neutral.danger .wy-alert-title, - .rst-content .wy-alert-neutral.error .admonition-title, - .rst-content .wy-alert-neutral.error .wy-alert-title, - .rst-content .wy-alert-neutral.hint .admonition-title, - .rst-content .wy-alert-neutral.hint .wy-alert-title, - .rst-content .wy-alert-neutral.important .admonition-title, - .rst-content .wy-alert-neutral.important .wy-alert-title, - .rst-content .wy-alert-neutral.note .admonition-title, - .rst-content .wy-alert-neutral.note .wy-alert-title, - .rst-content .wy-alert-neutral.seealso .admonition-title, - .rst-content .wy-alert-neutral.seealso .wy-alert-title, - .rst-content .wy-alert-neutral.tip .admonition-title, - .rst-content .wy-alert-neutral.tip .wy-alert-title, - .rst-content .wy-alert-neutral.warning .admonition-title, - .rst-content .wy-alert-neutral.warning .wy-alert-title, - .rst-content .wy-alert.wy-alert-neutral .admonition-title, - .wy-alert.wy-alert-neutral .rst-content .admonition-title, - .wy-alert.wy-alert-neutral .wy-alert-title { - color: rgb(192, 186, 178); - background-image: initial; - background-color: rgb(40, 43, 45); - } - .rst-content .wy-alert-neutral.admonition-todo a, - .rst-content .wy-alert-neutral.admonition a, - .rst-content .wy-alert-neutral.attention a, - .rst-content .wy-alert-neutral.caution a, - .rst-content .wy-alert-neutral.danger a, - .rst-content .wy-alert-neutral.error a, - .rst-content .wy-alert-neutral.hint a, - .rst-content .wy-alert-neutral.important a, - .rst-content .wy-alert-neutral.note a, - .rst-content .wy-alert-neutral.seealso a, - .rst-content .wy-alert-neutral.tip a, - .rst-content .wy-alert-neutral.warning a, - .wy-alert.wy-alert-neutral a { - color: rgb(84, 164, 217); - } - .wy-tray-container li { - background-image: initial; - background-color: transparent; - color: rgb(232, 230, 227); - box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 5px 0px; - } - .wy-tray-container li.wy-tray-item-success { - background-image: initial; - background-color: rgb(31, 139, 77); - } - .wy-tray-container li.wy-tray-item-info { - background-image: initial; - background-color: rgb(33, 102, 148); - } - .wy-tray-container li.wy-tray-item-warning { - background-image: initial; - background-color: rgb(178, 94, 20); - } - .wy-tray-container li.wy-tray-item-danger { - background-image: initial; - background-color: rgb(162, 33, 20); - } - .btn { - color: rgb(232, 230, 227); - border-color: rgba(140, 130, 115, 0.1); - background-color: rgb(31, 139, 77); - text-decoration-color: initial; - box-shadow: rgba(24, 26, 27, 0.5) 0px 1px 2px -1px inset, - rgba(0, 0, 0, 0.1) 0px -2px 0px 0px inset; - } - .btn-hover { - background-image: initial; - background-color: rgb(37, 114, 165); - color: rgb(232, 230, 227); - } - .btn:hover { - background-image: initial; - background-color: rgb(35, 156, 86); - color: rgb(232, 230, 227); - } - .btn:focus { - background-image: initial; - background-color: rgb(35, 156, 86); - outline-color: initial; - } - .btn:active { - box-shadow: rgba(0, 0, 0, 0.05) 0px -1px 0px 0px inset, - rgba(0, 0, 0, 0.1) 0px 2px 0px 0px inset; - } - .btn:visited { - color: rgb(232, 230, 227); - } - .btn-disabled, - .btn-disabled:active, - .btn-disabled:focus, - .btn-disabled:hover, - .btn:disabled { - background-image: none; - box-shadow: none; - } - .btn-info { - background-color: rgb(33, 102, 148) !important; - } - .btn-info:hover { - background-color: rgb(37, 114, 165) !important; - } - .btn-neutral { - background-color: rgb(27, 36, 36) !important; - color: rgb(192, 186, 178) !important; - } - .btn-neutral:hover { - color: rgb(192, 186, 178); - background-color: rgb(34, 44, 44) !important; - } - .btn-neutral:visited { - color: rgb(192, 186, 178) !important; - } - .btn-success { - background-color: rgb(31, 139, 77) !important; - } - .btn-success:hover { - background-color: rgb(27, 122, 68) !important; - } - .btn-danger { - background-color: rgb(162, 33, 20) !important; - } - .btn-danger:hover { - background-color: rgb(149, 30, 18) !important; - } - .btn-warning { - background-color: rgb(178, 94, 20) !important; - } - .btn-warning:hover { - background-color: rgb(165, 87, 18) !important; - } - .btn-invert { - background-color: rgb(26, 28, 29); - } - .btn-invert:hover { - background-color: rgb(35, 38, 40) !important; - } - .btn-link { - color: rgb(84, 164, 217); - box-shadow: none; - background-color: transparent !important; - border-color: transparent !important; - } - .btn-link:active, - .btn-link:hover { - box-shadow: none; - background-color: transparent !important; - color: rgb(79, 162, 216) !important; - } - .btn-link:visited { - color: rgb(164, 103, 188); - } - .wy-dropdown-menu { - background-image: initial; - background-color: rgb(26, 28, 29); - border-color: rgb(60, 65, 67); - box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 2px 0px; - } - .wy-dropdown-menu > dd > a { - color: rgb(192, 186, 178); - } - .wy-dropdown-menu > dd > a:hover { - background-image: initial; - background-color: rgb(33, 102, 148); - color: rgb(232, 230, 227); - } - .wy-dropdown-menu > dd.divider { - border-top-color: rgb(60, 65, 67); - } - .wy-dropdown-menu > dd.call-to-action { - background-image: initial; - background-color: rgb(40, 43, 45); - } - .wy-dropdown-menu > dd.call-to-action:hover { - background-image: initial; - background-color: rgb(40, 43, 45); - } - .wy-dropdown-menu > dd.call-to-action .btn { - color: rgb(232, 230, 227); - } - .wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu { - background-image: initial; - background-color: rgb(26, 28, 29); - } - .wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover { - background-image: initial; - background-color: rgb(33, 102, 148); - color: rgb(232, 230, 227); - } - .wy-dropdown-arrow::before { - border-bottom-color: rgb(51, 55, 57); - border-left-color: transparent; - border-right-color: transparent; - } - fieldset, - legend { - border-color: initial; - } - label { - color: rgb(200, 195, 188); - } - .wy-control-group.wy-control-group-required > label::after { - color: rgb(233, 88, 73); - } - .wy-form-message-inline { - color: rgb(168, 160, 149); - } - .wy-form-message { - color: rgb(168, 160, 149); - } - input[type="color"], input[type="date"], input[type="datetime-local"], input[type="datetime"], input[type="email"], input[type="month"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"] { - border-color: rgb(62, 68, 70); - box-shadow: rgb(43, 47, 49) 0px 1px 3px inset; - } - input[type="color"]:focus, input[type="date"]:focus, input[type="datetime-local"]:focus, input[type="datetime"]:focus, input[type="email"]:focus, input[type="month"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="week"]:focus { - outline-color: initial; - border-color: rgb(123, 114, 101); - } - input.no-focus:focus { - border-color: rgb(62, 68, 70) !important; - } - input[type="checkbox"]:focus, input[type="file"]:focus, input[type="radio"]:focus { - outline-color: rgb(13, 113, 167); - } - input[type="color"][disabled], input[type="date"][disabled], input[type="datetime-local"][disabled], input[type="datetime"][disabled], input[type="email"][disabled], input[type="month"][disabled], input[type="number"][disabled], input[type="password"][disabled], input[type="search"][disabled], input[type="tel"][disabled], input[type="text"][disabled], input[type="time"][disabled], input[type="url"][disabled], input[type="week"][disabled] { - background-color: rgb(27, 29, 30); - } - input:focus:invalid, - select:focus:invalid, - textarea:focus:invalid { - color: rgb(233, 88, 73); - border-color: rgb(149, 31, 18); - } - input:focus:invalid:focus, - select:focus:invalid:focus, - textarea:focus:invalid:focus { - border-color: rgb(149, 31, 18); - } - input[type="checkbox"]:focus:invalid:focus, input[type="file"]:focus:invalid:focus, input[type="radio"]:focus:invalid:focus { - outline-color: rgb(149, 31, 18); - } - select, - textarea { - border-color: rgb(62, 68, 70); - box-shadow: rgb(43, 47, 49) 0px 1px 3px inset; - } - select { - border-color: rgb(62, 68, 70); - background-color: rgb(24, 26, 27); - } - select:focus, - textarea:focus { - outline-color: initial; - } - input[readonly], - select[disabled], - select[readonly], - textarea[disabled], - textarea[readonly] { - background-color: rgb(27, 29, 30); - } - .wy-checkbox, - .wy-radio { - color: rgb(192, 186, 178); - } - .wy-input-prefix .wy-input-context, - .wy-input-suffix .wy-input-context { - background-color: rgb(27, 36, 36); - border-color: rgb(62, 68, 70); - color: rgb(168, 160, 149); - } - .wy-input-suffix .wy-input-context { - border-left-color: initial; - } - .wy-input-prefix .wy-input-context { - border-right-color: initial; - } - .wy-switch::before { - background-image: initial; - background-color: rgb(53, 57, 59); - } - .wy-switch::after { - background-image: initial; - background-color: rgb(82, 88, 92); - } - .wy-switch span { - color: rgb(200, 195, 188); - } - .wy-switch.active::before { - background-image: initial; - background-color: rgb(24, 106, 58); - } - .wy-switch.active::after { - background-image: initial; - background-color: rgb(31, 139, 77); - } - .wy-control-group.wy-control-group-error .wy-form-message, - .wy-control-group.wy-control-group-error > label { - color: rgb(233, 88, 73); - } - .wy-control-group.wy-control-group-error input[type="color"], .wy-control-group.wy-control-group-error input[type="date"], .wy-control-group.wy-control-group-error input[type="datetime-local"], .wy-control-group.wy-control-group-error input[type="datetime"], .wy-control-group.wy-control-group-error input[type="email"], .wy-control-group.wy-control-group-error input[type="month"], .wy-control-group.wy-control-group-error input[type="number"], .wy-control-group.wy-control-group-error input[type="password"], .wy-control-group.wy-control-group-error input[type="search"], .wy-control-group.wy-control-group-error input[type="tel"], .wy-control-group.wy-control-group-error input[type="text"], .wy-control-group.wy-control-group-error input[type="time"], .wy-control-group.wy-control-group-error input[type="url"], .wy-control-group.wy-control-group-error input[type="week"], - .wy-control-group.wy-control-group-error textarea { - border-color: rgb(149, 31, 18); - } - .wy-inline-validate.wy-inline-validate-success .wy-input-context { - color: rgb(92, 218, 145); - } - .wy-inline-validate.wy-inline-validate-danger .wy-input-context { - color: rgb(233, 88, 73); - } - .wy-inline-validate.wy-inline-validate-warning .wy-input-context { - color: rgb(232, 138, 54); - } - .wy-inline-validate.wy-inline-validate-info .wy-input-context { - color: rgb(84, 164, 217); - } - .rst-content table.docutils caption, - .rst-content table.field-list caption, - .wy-table caption { - color: rgb(232, 230, 227); - } - .rst-content table.docutils thead, - .rst-content table.field-list thead, - .wy-table thead { - color: rgb(232, 230, 227); - } - .rst-content table.docutils thead th, - .rst-content table.field-list thead th, - .wy-table thead th { - border-bottom-color: rgb(56, 61, 63); - } - .rst-content table.docutils td, - .rst-content table.field-list td, - .wy-table td { - background-color: transparent; - } - .wy-table-secondary { - color: rgb(152, 143, 129); - } - .wy-table-tertiary { - color: rgb(152, 143, 129); - } - .rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td, - .wy-table-backed, - .wy-table-odd td, - .wy-table-striped tr:nth-child(2n-1) td { - background-color: rgb(27, 36, 36); - } - .rst-content table.docutils, - .wy-table-bordered-all { - border-color: rgb(56, 61, 63); - } - .rst-content table.docutils td, - .wy-table-bordered-all td { - border-bottom-color: rgb(56, 61, 63); - border-left-color: rgb(56, 61, 63); - } - .wy-table-bordered { - border-color: rgb(56, 61, 63); - } - .wy-table-bordered-rows td { - border-bottom-color: rgb(56, 61, 63); - } - .wy-table-horizontal td, - .wy-table-horizontal th { - border-bottom-color: rgb(56, 61, 63); - } - a { - color: rgb(84, 164, 217); - text-decoration-color: initial; - } - a:hover { - color: rgb(68, 156, 214); - } - a:visited { - color: rgb(164, 103, 188); - } - body { - color: rgb(192, 186, 178); - background-image: initial; - background-color: rgb(33, 35, 37); - } - .wy-text-strike { - text-decoration-color: initial; - } - .wy-text-warning { - color: rgb(232, 138, 54) !important; - } - a.wy-text-warning:hover { - color: rgb(236, 157, 87) !important; - } - .wy-text-info { - color: rgb(84, 164, 217) !important; - } - a.wy-text-info:hover { - color: rgb(79, 162, 216) !important; - } - .wy-text-success { - color: rgb(92, 218, 145) !important; - } - a.wy-text-success:hover { - color: rgb(73, 214, 133) !important; - } - .wy-text-danger { - color: rgb(233, 88, 73) !important; - } - a.wy-text-danger:hover { - color: rgb(237, 118, 104) !important; - } - .wy-text-neutral { - color: rgb(192, 186, 178) !important; - } - a.wy-text-neutral:hover { - color: rgb(176, 169, 159) !important; - } - hr { - border-right-color: initial; - border-bottom-color: initial; - border-left-color: initial; - border-top-color: rgb(56, 61, 63); - } - .rst-content code, - .rst-content tt, - code { - background-image: initial; - background-color: rgb(24, 26, 27); - border-color: rgb(56, 61, 63); - color: rgb(233, 88, 73); - } - .rst-content .section ul, - .rst-content .toctree-wrapper ul, - .wy-plain-list-disc, - article ul { - list-style-image: initial; - } - .rst-content .section ul li, - .rst-content .toctree-wrapper ul li, - .wy-plain-list-disc li, - article ul li { - list-style-image: initial; - } - .rst-content .section ul li li, - .rst-content .toctree-wrapper ul li li, - .wy-plain-list-disc li li, - article ul li li { - list-style-image: initial; - } - .rst-content .section ul li li li, - .rst-content .toctree-wrapper ul li li li, - .wy-plain-list-disc li li li, - article ul li li li { - list-style-image: initial; - } - .rst-content .section ul li ol li, - .rst-content .toctree-wrapper ul li ol li, - .wy-plain-list-disc li ol li, - article ul li ol li { - list-style-image: initial; - } - .rst-content .section ol, - .rst-content ol.arabic, - .wy-plain-list-decimal, - article ol { - list-style-image: initial; - } - .rst-content .section ol li, - .rst-content ol.arabic li, - .wy-plain-list-decimal li, - article ol li { - list-style-image: initial; - } - .rst-content .section ol li ul li, - .rst-content ol.arabic li ul li, - .wy-plain-list-decimal li ul li, - article ol li ul li { - list-style-image: initial; - } - .rst-content .wy-breadcrumbs li tt, - .wy-breadcrumbs li .rst-content tt, - .wy-breadcrumbs li code { - border-color: initial; - background-image: none; - background-color: initial; - } - .rst-content .wy-breadcrumbs li tt.literal, - .wy-breadcrumbs li .rst-content tt.literal, - .wy-breadcrumbs li code.literal { - color: rgb(192, 186, 178); - } - .wy-breadcrumbs-extra { - color: rgb(184, 178, 169); - } - .wy-menu a:hover { - text-decoration-color: initial; - } - .wy-menu-horiz li:hover { - background-image: initial; - background-color: rgba(24, 26, 27, 0.1); - } - .wy-menu-horiz li.divide-left { - border-left-color: rgb(119, 110, 98); - } - .wy-menu-horiz li.divide-right { - border-right-color: rgb(119, 110, 98); - } - .wy-menu-vertical header, - .wy-menu-vertical p.caption { - color: rgb(94, 170, 219); - } - .wy-menu-vertical li.divide-top { - border-top-color: rgb(119, 110, 98); - } - .wy-menu-vertical li.divide-bottom { - border-bottom-color: rgb(119, 110, 98); - } - .wy-menu-vertical li.current { - background-image: initial; - background-color: rgb(40, 43, 45); - } - .wy-menu-vertical li.current a { - color: rgb(152, 143, 129); - border-right-color: rgb(63, 69, 71); - } - .wy-menu-vertical li.current a:hover { - background-image: initial; - background-color: rgb(47, 51, 53); - } - .rst-content .wy-menu-vertical li tt, - .wy-menu-vertical li .rst-content tt, - .wy-menu-vertical li code { - border-color: initial; - background-image: inherit; - background-color: inherit; - color: inherit; - } - .wy-menu-vertical li span.toctree-expand { - color: rgb(183, 177, 168); - } - .wy-menu-vertical li.current > a, - .wy-menu-vertical li.on a { - color: rgb(192, 186, 178); - background-image: initial; - background-color: rgb(26, 28, 29); - border-color: initial; - } - .wy-menu-vertical li.current > a:hover, - .wy-menu-vertical li.on a:hover { - background-image: initial; - background-color: rgb(26, 28, 29); - } - .wy-menu-vertical li.current > a:hover span.toctree-expand, - .wy-menu-vertical li.on a:hover span.toctree-expand { - color: rgb(152, 143, 129); - } - .wy-menu-vertical li.current > a span.toctree-expand, - .wy-menu-vertical li.on a span.toctree-expand { - color: rgb(200, 195, 188); - } - .wy-menu-vertical li.toctree-l1.current > a { - border-bottom-color: rgb(63, 69, 71); - border-top-color: rgb(63, 69, 71); - } - .wy-menu-vertical li.toctree-l2 a, - .wy-menu-vertical li.toctree-l3 a, - .wy-menu-vertical li.toctree-l4 a, - .wy-menu-vertical li.toctree-l5 a, - .wy-menu-vertical li.toctree-l6 a, - .wy-menu-vertical li.toctree-l7 a, - .wy-menu-vertical li.toctree-l8 a, - .wy-menu-vertical li.toctree-l9 a, - .wy-menu-vertical li.toctree-l10 a { - color: rgb(192, 186, 178); - } - .wy-menu-vertical li.toctree-l2 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l3 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l4 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l5 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l6 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l7 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l8 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l9 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l10 a:hover span.toctree-expand { - color: rgb(152, 143, 129); - } - .wy-menu-vertical li.toctree-l2.current > a, - .wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a { - background-image: initial; - background-color: rgb(54, 59, 61); - } - .wy-menu-vertical li.toctree-l2 span.toctree-expand { - color: rgb(174, 167, 156); - } - .wy-menu-vertical li.toctree-l3.current > a, - .wy-menu-vertical li.toctree-l3.current li.toctree-l4 > a { - background-image: initial; - background-color: rgb(61, 66, 69); - } - .wy-menu-vertical li.toctree-l3 span.toctree-expand { - color: rgb(166, 158, 146); - } - .wy-menu-vertical li ul li a { - color: rgb(208, 204, 198); - } - .wy-menu-vertical a { - color: rgb(208, 204, 198); - } - .wy-menu-vertical a:hover { - background-color: rgb(57, 62, 64); - } - .wy-menu-vertical a:hover span.toctree-expand { - color: rgb(208, 204, 198); - } - .wy-menu-vertical a:active { - background-color: rgb(33, 102, 148); - color: rgb(232, 230, 227); - } - .wy-menu-vertical a:active span.toctree-expand { - color: rgb(232, 230, 227); - } - .wy-side-nav-search { - background-color: rgb(33, 102, 148); - color: rgb(230, 228, 225); - } - .wy-side-nav-search input[type="text"] { - border-color: rgb(35, 111, 160); - } - .wy-side-nav-search img { - background-color: rgb(33, 102, 148); - } - .wy-side-nav-search .wy-dropdown > a, - .wy-side-nav-search > a { - color: rgb(230, 228, 225); - } - .wy-side-nav-search .wy-dropdown > a:hover, - .wy-side-nav-search > a:hover { - background-image: initial; - background-color: rgba(24, 26, 27, 0.1); - } - .wy-side-nav-search .wy-dropdown > a img.logo, - .wy-side-nav-search > a img.logo { - background-image: initial; - background-color: transparent; - } - .wy-side-nav-search > div.version { - color: rgba(232, 230, 227, 0.3); - } - .wy-nav .wy-menu-vertical header { - color: rgb(84, 164, 217); - } - .wy-nav .wy-menu-vertical a { - color: rgb(184, 178, 169); - } - .wy-nav .wy-menu-vertical a:hover { - background-color: rgb(33, 102, 148); - color: rgb(232, 230, 227); - } - .wy-body-for-nav { - background-image: initial; - background-color: rgb(26, 28, 29); - } - .wy-nav-side { - color: rgb(169, 161, 150); - background-image: initial; - background-color: rgb(38, 41, 43); - } - .wy-nav-top { - background-image: initial; - background-color: rgb(33, 102, 148); - color: rgb(232, 230, 227); - } - .wy-nav-top a { - color: rgb(232, 230, 227); - } - .wy-nav-top img { - background-color: rgb(33, 102, 148); - } - .wy-nav-content-wrap { - background-image: initial; - background-color: rgb(26, 28, 29); - } - .wy-body-mask { - background-image: initial; - background-color: rgba(0, 0, 0, 0.2); - } - footer { - color: rgb(152, 143, 129); - } - .rst-content footer span.commit tt, - footer span.commit .rst-content tt, - footer span.commit code { - background-image: none; - background-color: initial; - border-color: initial; - color: rgb(152, 143, 129); - } - #search-results .search li { - border-bottom-color: rgb(56, 61, 63); - } - #search-results .search li:first-child { - border-top-color: rgb(56, 61, 63); - } - #search-results .context { - color: rgb(152, 143, 129); - } - .wy-body-for-nav { - background-image: initial; - background-color: rgb(26, 28, 29); - } - @media screen and (min-width: 1100px) { - .wy-nav-content-wrap { - background-image: initial; - background-color: rgba(0, 0, 0, 0.05); - } - .wy-nav-content { - background-image: initial; - background-color: rgb(26, 28, 29); - } - } - .rst-versions { - color: rgb(230, 228, 225); - background-image: initial; - background-color: rgb(23, 24, 25); - } - .rst-versions a { - color: rgb(84, 164, 217); - text-decoration-color: initial; - } - .rst-versions .rst-current-version { - background-color: rgb(29, 31, 32); - color: rgb(92, 218, 145); - } - .rst-content .code-block-caption .rst-versions .rst-current-version .headerlink, - .rst-content .rst-versions .rst-current-version .admonition-title, - .rst-content code.download .rst-versions .rst-current-version span:first-child, - .rst-content dl dt .rst-versions .rst-current-version .headerlink, - .rst-content h1 .rst-versions .rst-current-version .headerlink, - .rst-content h2 .rst-versions .rst-current-version .headerlink, - .rst-content h3 .rst-versions .rst-current-version .headerlink, - .rst-content h4 .rst-versions .rst-current-version .headerlink, - .rst-content h5 .rst-versions .rst-current-version .headerlink, - .rst-content h6 .rst-versions .rst-current-version .headerlink, - .rst-content p.caption .rst-versions .rst-current-version .headerlink, - .rst-content table > caption .rst-versions .rst-current-version .headerlink, - .rst-content tt.download .rst-versions .rst-current-version span:first-child, - .rst-versions .rst-current-version .fa, - .rst-versions .rst-current-version .icon, - .rst-versions .rst-current-version .rst-content .admonition-title, - .rst-versions .rst-current-version .rst-content .code-block-caption .headerlink, - .rst-versions .rst-current-version .rst-content code.download span:first-child, - .rst-versions .rst-current-version .rst-content dl dt .headerlink, - .rst-versions .rst-current-version .rst-content h1 .headerlink, - .rst-versions .rst-current-version .rst-content h2 .headerlink, - .rst-versions .rst-current-version .rst-content h3 .headerlink, - .rst-versions .rst-current-version .rst-content h4 .headerlink, - .rst-versions .rst-current-version .rst-content h5 .headerlink, - .rst-versions .rst-current-version .rst-content h6 .headerlink, - .rst-versions .rst-current-version .rst-content p.caption .headerlink, - .rst-versions .rst-current-version .rst-content table > caption .headerlink, - .rst-versions .rst-current-version .rst-content tt.download span:first-child, - .rst-versions .rst-current-version .wy-menu-vertical li span.toctree-expand, - .wy-menu-vertical li .rst-versions .rst-current-version span.toctree-expand { - color: rgb(230, 228, 225); - } - .rst-versions .rst-current-version.rst-out-of-date { - background-color: rgb(162, 33, 20); - color: rgb(232, 230, 227); - } - .rst-versions .rst-current-version.rst-active-old-version { - background-color: rgb(192, 156, 11); - color: rgb(232, 230, 227); - } - .rst-versions .rst-other-versions { - color: rgb(152, 143, 129); - } - .rst-versions .rst-other-versions hr { - border-right-color: initial; - border-bottom-color: initial; - border-left-color: initial; - border-top-color: rgb(119, 111, 98); - } - .rst-versions .rst-other-versions dd a { - color: rgb(230, 228, 225); - } - .rst-versions.rst-badge { - border-color: initial; - } - .rst-content abbr[title] { - text-decoration-color: initial; - } - .rst-content.style-external-links a.reference.external::after { - color: rgb(184, 178, 169); - } - .rst-content div[class^="highlight"], - .rst-content pre.literal-block { - border-color: rgb(56, 61, 63); - } - .rst-content div[class^="highlight"] div[class^="highlight"], .rst-content pre.literal-block div[class^="highlight"] { - border-color: initial; - } - .rst-content .linenodiv pre { - border-right-color: rgb(54, 59, 61); - } - .rst-content .admonition table { - border-color: rgba(140, 130, 115, 0.1); - } - .rst-content .admonition table td, - .rst-content .admonition table th { - background-image: initial !important; - background-color: transparent !important; - border-color: rgba(140, 130, 115, 0.1) !important; - } - .rst-content .section ol.loweralpha, - .rst-content .section ol.loweralpha > li { - list-style-image: initial; - } - .rst-content .section ol.upperalpha, - .rst-content .section ol.upperalpha > li { - list-style-image: initial; - } - .rst-content .toc-backref { - color: rgb(192, 186, 178); - } - .rst-content .sidebar { - background-image: initial; - background-color: rgb(27, 36, 36); - border-color: rgb(56, 61, 63); - } - .rst-content .sidebar .sidebar-title { - background-image: initial; - background-color: rgb(40, 43, 45); - } - .rst-content .highlighted { - background-image: initial; - background-color: rgb(192, 156, 11); - box-shadow: rgb(192, 156, 11) 0px 0px 0px 2px; - } - html.writer-html4 .rst-content table.docutils.citation, - html.writer-html4 .rst-content table.docutils.footnote { - background-image: none; - background-color: initial; - border-color: initial; - } - html.writer-html4 .rst-content table.docutils.citation td, - html.writer-html4 .rst-content table.docutils.citation tr, - html.writer-html4 .rst-content table.docutils.footnote td, - html.writer-html4 .rst-content table.docutils.footnote tr { - border-color: initial; - background-color: transparent !important; - } - .rst-content table.docutils.footnote, - html.writer-html4 .rst-content table.docutils.citation, - html.writer-html5 .rst-content dl.footnote { - color: rgb(152, 143, 129); - } - .rst-content table.docutils.footnote code, - .rst-content table.docutils.footnote tt, - html.writer-html4 .rst-content table.docutils.citation code, - html.writer-html4 .rst-content table.docutils.citation tt, - html.writer-html5 .rst-content dl.footnote code, - html.writer-html5 .rst-content dl.footnote tt { - color: rgb(178, 172, 162); - } - .rst-content table.docutils th { - border-color: rgb(56, 61, 63); - } - html.writer-html5 .rst-content table.docutils th { - border-color: rgb(56, 61, 63); - } - .rst-content table.field-list, - .rst-content table.field-list td { - border-color: initial; - } - .rst-content code, - .rst-content tt { - color: rgb(232, 230, 227); - } - .rst-content code.literal, - .rst-content tt.literal { - /* Manually overridden */ - color: rgb(228, 138, 128); - /*color: rgb(233, 88, 73);*/ - } - .rst-content code.xref, - .rst-content tt.xref, - a .rst-content code, - a .rst-content tt { - color: rgb(192, 186, 178); - } - .rst-content a code, - .rst-content a tt { - color: rgb(84, 164, 217); - } - html.writer-html4 .rst-content dl:not(.docutils) > dt, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) > dt { - background-image: initial; - background-color: rgb(32, 35, 36); - color: rgb(84, 164, 217); - border-top-color: rgb(28, 89, 128); - } - html.writer-html4 .rst-content dl:not(.docutils) > dt::before, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) > dt::before { - color: rgb(109, 178, 223); - } - html.writer-html4 .rst-content dl:not(.docutils) > dt .headerlink, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) > dt .headerlink { - color: rgb(192, 186, 178); - } - html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list) > dt, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list) > dt { - border-top-color: initial; - border-right-color: initial; - border-bottom-color: initial; - border-left-color: rgb(62, 68, 70); - background-image: initial; - background-color: rgb(32, 35, 37); - color: rgb(178, 172, 162); - } - html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list) > dt .headerlink, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list) > dt .headerlink { - color: rgb(192, 186, 178); - } - html.writer-html4 .rst-content dl:not(.docutils) code.descclassname, - html.writer-html4 .rst-content dl:not(.docutils) code.descname, - html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname, - html.writer-html4 .rst-content dl:not(.docutils) tt.descname, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descclassname, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descclassname, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descname { - background-color: transparent; - border-color: initial; - } - html.writer-html4 .rst-content dl:not(.docutils) .optional, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .optional { - color: rgb(232, 230, 227); - } - .rst-content .viewcode-back, - .rst-content .viewcode-link { - color: rgb(92, 218, 145); - } - .rst-content code.download, - .rst-content tt.download { - background-image: inherit; - background-color: inherit; - color: inherit; - border-color: inherit; - } - .rst-content .guilabel { - border-color: rgb(27, 84, 122); - background-image: initial; - background-color: rgb(32, 35, 36); - } - span[id*="MathJax-Span"] { - color: rgb(192, 186, 178); - } - td.linenos pre { - color: rgb(232, 230, 227); - background-color: rgb(32, 35, 37); - } - span.linenos { - color: rgb(232, 230, 227); - background-color: rgb(32, 35, 37); - } - td.linenos pre.special { - color: rgb(232, 230, 227); - background-color: rgb(89, 89, 0); - } - span.linenos.special { - color: rgb(232, 230, 227); - background-color: rgb(89, 89, 0); - } - .highlight .hll { - background-color: rgb(82, 82, 0); - } - .highlight { - background-image: initial; - /* Manually overridden */ - background-color: rgb(44 47 37); - /*background-color: rgb(61, 82, 0);*/ - } - .highlight .c { - color: rgb(119, 179, 195); - } - .highlight .err { - border-color: rgb(179, 0, 0); - } - .highlight .k { - color: rgb(126, 255, 163); - } - .highlight .o { - color: rgb(168, 160, 149); - } - .highlight .ch { - color: rgb(119, 179, 195); - } - .highlight .cm { - color: rgb(119, 179, 195); - } - .highlight .cp { - color: rgb(126, 255, 163); - } - .highlight .cpf { - color: rgb(119, 179, 195); - } - .highlight .c1 { - color: rgb(119, 179, 195); - } - .highlight .cs { - color: rgb(119, 179, 195); - background-color: rgb(60, 0, 0); - } - .highlight .gd { - color: rgb(255, 92, 92); - } - .highlight .gr { - color: rgb(255, 26, 26); - } - .highlight .gh { - color: rgb(127, 174, 255); - } - .highlight .gi { - color: rgb(92, 255, 92); - } - .highlight .go { - color: rgb(200, 195, 188); - } - .highlight .gp { - color: rgb(246, 147, 68); - } - .highlight .gu { - color: rgb(255, 114, 255); - } - .highlight .gt { - color: rgb(71, 160, 255); - } - .highlight .kc { - color: rgb(126, 255, 163); - } - .highlight .kd { - color: rgb(126, 255, 163); - } - .highlight .kn { - color: rgb(126, 255, 163); - } - .highlight .kp { - color: rgb(126, 255, 163); - } - .highlight .kr { - color: rgb(126, 255, 163); - } - .highlight .kt { - color: rgb(255, 137, 103); - } - .highlight .m { - color: rgb(125, 222, 174); - } - .highlight .s { - color: rgb(123, 166, 202); - } - .highlight .na { - color: rgb(123, 166, 202); - } - .highlight .nb { - color: rgb(126, 255, 163); - } - .highlight .nc { - color: rgb(81, 194, 242); - } - .highlight .no { - color: rgb(103, 177, 215); - } - .highlight .nd { - color: rgb(178, 172, 162); - } - .highlight .ni { - color: rgb(217, 100, 73); - } - .highlight .ne { - color: rgb(126, 255, 163); - } - .highlight .nf { - color: rgb(131, 186, 249); - } - .highlight .nl { - color: rgb(137, 193, 255); - } - .highlight .nn { - color: rgb(81, 194, 242); - } - .highlight .nt { - color: rgb(138, 191, 249); - } - .highlight .nv { - color: rgb(190, 103, 215); - } - .highlight .ow { - color: rgb(126, 255, 163); - } - .highlight .w { - color: rgb(189, 183, 175); - } - .highlight .mb { - color: rgb(125, 222, 174); - } - .highlight .mf { - color: rgb(125, 222, 174); - } - .highlight .mh { - color: rgb(125, 222, 174); - } - .highlight .mi { - color: rgb(125, 222, 174); - } - .highlight .mo { - color: rgb(125, 222, 174); - } - .highlight .sa { - color: rgb(123, 166, 202); - } - .highlight .sb { - color: rgb(123, 166, 202); - } - .highlight .sc { - color: rgb(123, 166, 202); - } - .highlight .dl { - color: rgb(123, 166, 202); - } - .highlight .sd { - color: rgb(123, 166, 202); - } - .highlight .s2 { - color: rgb(123, 166, 202); - } - .highlight .se { - color: rgb(123, 166, 202); - } - .highlight .sh { - color: rgb(123, 166, 202); - } - .highlight .si { - color: rgb(117, 168, 209); - } - .highlight .sx { - color: rgb(246, 147, 68); - } - .highlight .sr { - color: rgb(133, 182, 224); - } - .highlight .s1 { - color: rgb(123, 166, 202); - } - .highlight .ss { - color: rgb(188, 230, 128); - } - .highlight .bp { - color: rgb(126, 255, 163); - } - .highlight .fm { - color: rgb(131, 186, 249); - } - .highlight .vc { - color: rgb(190, 103, 215); - } - .highlight .vg { - color: rgb(190, 103, 215); - } - .highlight .vi { - color: rgb(190, 103, 215); - } - .highlight .vm { - color: rgb(190, 103, 215); - } - .highlight .il { - color: rgb(125, 222, 174); - } - @media (prefers-color-scheme: dark) { - html { - background-color: rgb(19, 21, 22) !important; - } - html, - body, - input, - textarea, - select, - button { - background-color: rgb(19, 21, 22); - } - html, - body, - input, - textarea, - select, - button { - border-color: rgb(106, 98, 87); - color: rgb(216, 212, 207); - } - a { - color: rgb(61, 165, 255); - } - table { - border-color: rgb(111, 103, 91); - } - ::placeholder { - color: rgb(178, 171, 161); - } - input:-webkit-autofill, - textarea:-webkit-autofill, - select:-webkit-autofill { - background-color: rgb(68, 73, 0) !important; - color: rgb(216, 212, 207) !important; - } - ::-webkit-scrollbar { - background-color: rgb(26, 28, 29); - color: rgb(173, 166, 156); - } - ::-webkit-scrollbar-thumb { - background-color: rgb(55, 60, 62); - } - ::-webkit-scrollbar-thumb:hover { - background-color: rgb(70, 75, 78); - } - ::-webkit-scrollbar-thumb:active { - background-color: rgb(58, 62, 65); - } - ::-webkit-scrollbar-corner { - background-color: rgb(19, 21, 22); - } - ::selection { - background-color: rgb(0, 62, 136) !important; - color: rgb(216, 212, 207) !important; - } - :root { - --darkreader-neutral-background: #131516; - --darkreader-text--darkreader-neutral-text: #cdc8c2; - --darkreader-selection-background: #004daa; - --darkreader-selection-text: #e8e6e3; - } - a:active, - a:hover { - outline-color: currentcolor; - } - abbr[title] { - border-bottom-color: currentcolor; - } - ins { - background-color: rgb(90, 90, 0); - background-image: none; - text-decoration-color: currentcolor; - } - ins, - mark { - color: rgb(216, 212, 207); - } - mark { - background-color: rgb(163, 163, 0); - background-image: none; - } - dl, - ol, - ul { - list-style-image: none; - } - li { - list-style-image: none; - } - img { - border-color: currentcolor; - } - .chromeframe { - background-color: rgb(42, 46, 47); - background-image: none; - color: rgb(216, 212, 207); - } - .ir { - border-color: currentcolor; - background-color: transparent; - } - .visuallyhidden { - border-color: currentcolor; - } - .fa-border { - border-color: rgb(122, 113, 100); - } - .fa-inverse { - color: rgb(216, 212, 207); - } - .sr-only { - border-color: currentcolor; - } - .fa::before, - .icon::before, - .rst-content .admonition-title::before, - .rst-content .code-block-caption .headerlink::before, - .rst-content code.download span:first-child::before, - .rst-content dl dt .headerlink::before, - .rst-content h1 .headerlink::before, - .rst-content h2 .headerlink::before, - .rst-content h3 .headerlink::before, - .rst-content h4 .headerlink::before, - .rst-content h5 .headerlink::before, - .rst-content h6 .headerlink::before, - .rst-content p.caption .headerlink::before, - .rst-content table > caption .headerlink::before, - .rst-content tt.download span:first-child::before, - .wy-dropdown .caret::before, - .wy-inline-validate.wy-inline-validate-danger .wy-input-context::before, - .wy-inline-validate.wy-inline-validate-info .wy-input-context::before, - .wy-inline-validate.wy-inline-validate-success .wy-input-context::before, - .wy-inline-validate.wy-inline-validate-warning .wy-input-context::before, - .wy-menu-vertical li.current > a span.toctree-expand::before, - .wy-menu-vertical li.on a span.toctree-expand::before, - .wy-menu-vertical li span.toctree-expand::before { - text-decoration-color: inherit; - } - .rst-content .code-block-caption a .headerlink, - .rst-content a .admonition-title, - .rst-content code.download a span:first-child, - .rst-content dl dt a .headerlink, - .rst-content h1 a .headerlink, - .rst-content h2 a .headerlink, - .rst-content h3 a .headerlink, - .rst-content h4 a .headerlink, - .rst-content h5 a .headerlink, - .rst-content h6 a .headerlink, - .rst-content p.caption a .headerlink, - .rst-content table > caption a .headerlink, - .rst-content tt.download a span:first-child, - .wy-menu-vertical li.current > a span.toctree-expand, - .wy-menu-vertical li.on a span.toctree-expand, - .wy-menu-vertical li a span.toctree-expand, - a .fa, - a .icon, - a .rst-content .admonition-title, - a .rst-content .code-block-caption .headerlink, - a .rst-content code.download span:first-child, - a .rst-content dl dt .headerlink, - a .rst-content h1 .headerlink, - a .rst-content h2 .headerlink, - a .rst-content h3 .headerlink, - a .rst-content h4 .headerlink, - a .rst-content h5 .headerlink, - a .rst-content h6 .headerlink, - a .rst-content p.caption .headerlink, - a .rst-content table > caption .headerlink, - a .rst-content tt.download span:first-child, - a .wy-menu-vertical li span.toctree-expand { - text-decoration-color: inherit; - } - .rst-content .admonition, - .rst-content .admonition-todo, - .rst-content .attention, - .rst-content .caution, - .rst-content .danger, - .rst-content .error, - .rst-content .hint, - .rst-content .important, - .rst-content .note, - .rst-content .seealso, - .rst-content .tip, - .rst-content .warning, - .wy-alert { - background-color: rgb(26, 28, 29); - background-image: none; - } - .rst-content .admonition-title, - .wy-alert-title { - color: rgb(216, 212, 207); - background-color: rgb(23, 73, 105); - background-image: none; - } - .rst-content .danger, - .rst-content .error, - .rst-content .wy-alert-danger.admonition, - .rst-content .wy-alert-danger.admonition-todo, - .rst-content .wy-alert-danger.attention, - .rst-content .wy-alert-danger.caution, - .rst-content .wy-alert-danger.hint, - .rst-content .wy-alert-danger.important, - .rst-content .wy-alert-danger.note, - .rst-content .wy-alert-danger.seealso, - .rst-content .wy-alert-danger.tip, - .rst-content .wy-alert-danger.warning, - .wy-alert.wy-alert-danger { - background-color: rgb(42, 10, 6); - background-image: none; - } - .rst-content .danger .admonition-title, - .rst-content .danger .wy-alert-title, - .rst-content .error .admonition-title, - .rst-content .error .wy-alert-title, - .rst-content .wy-alert-danger.admonition-todo .admonition-title, - .rst-content .wy-alert-danger.admonition-todo .wy-alert-title, - .rst-content .wy-alert-danger.admonition .admonition-title, - .rst-content .wy-alert-danger.admonition .wy-alert-title, - .rst-content .wy-alert-danger.attention .admonition-title, - .rst-content .wy-alert-danger.attention .wy-alert-title, - .rst-content .wy-alert-danger.caution .admonition-title, - .rst-content .wy-alert-danger.caution .wy-alert-title, - .rst-content .wy-alert-danger.hint .admonition-title, - .rst-content .wy-alert-danger.hint .wy-alert-title, - .rst-content .wy-alert-danger.important .admonition-title, - .rst-content .wy-alert-danger.important .wy-alert-title, - .rst-content .wy-alert-danger.note .admonition-title, - .rst-content .wy-alert-danger.note .wy-alert-title, - .rst-content .wy-alert-danger.seealso .admonition-title, - .rst-content .wy-alert-danger.seealso .wy-alert-title, - .rst-content .wy-alert-danger.tip .admonition-title, - .rst-content .wy-alert-danger.tip .wy-alert-title, - .rst-content .wy-alert-danger.warning .admonition-title, - .rst-content .wy-alert-danger.warning .wy-alert-title, - .rst-content .wy-alert.wy-alert-danger .admonition-title, - .wy-alert.wy-alert-danger .rst-content .admonition-title, - .wy-alert.wy-alert-danger .wy-alert-title { - background-color: rgb(86, 18, 10); - background-image: none; - } - .rst-content .admonition-todo, - .rst-content .attention, - .rst-content .caution, - .rst-content .warning, - .rst-content .wy-alert-warning.admonition, - .rst-content .wy-alert-warning.danger, - .rst-content .wy-alert-warning.error, - .rst-content .wy-alert-warning.hint, - .rst-content .wy-alert-warning.important, - .rst-content .wy-alert-warning.note, - .rst-content .wy-alert-warning.seealso, - .rst-content .wy-alert-warning.tip, - .wy-alert.wy-alert-warning { - background-color: rgb(25, 27, 28); - background-image: none; - } - .rst-content .admonition-todo .admonition-title, - .rst-content .admonition-todo .wy-alert-title, - .rst-content .attention .admonition-title, - .rst-content .attention .wy-alert-title, - .rst-content .caution .admonition-title, - .rst-content .caution .wy-alert-title, - .rst-content .warning .admonition-title, - .rst-content .warning .wy-alert-title, - .rst-content .wy-alert-warning.admonition .admonition-title, - .rst-content .wy-alert-warning.admonition .wy-alert-title, - .rst-content .wy-alert-warning.danger .admonition-title, - .rst-content .wy-alert-warning.danger .wy-alert-title, - .rst-content .wy-alert-warning.error .admonition-title, - .rst-content .wy-alert-warning.error .wy-alert-title, - .rst-content .wy-alert-warning.hint .admonition-title, - .rst-content .wy-alert-warning.hint .wy-alert-title, - .rst-content .wy-alert-warning.important .admonition-title, - .rst-content .wy-alert-warning.important .wy-alert-title, - .rst-content .wy-alert-warning.note .admonition-title, - .rst-content .wy-alert-warning.note .wy-alert-title, - .rst-content .wy-alert-warning.seealso .admonition-title, - .rst-content .wy-alert-warning.seealso .wy-alert-title, - .rst-content .wy-alert-warning.tip .admonition-title, - .rst-content .wy-alert-warning.tip .wy-alert-title, - .rst-content .wy-alert.wy-alert-warning .admonition-title, - .wy-alert.wy-alert-warning .rst-content .admonition-title, - .wy-alert.wy-alert-warning .wy-alert-title { - background-color: rgb(98, 52, 11); - background-image: none; - } - .rst-content .note, - .rst-content .seealso, - .rst-content .wy-alert-info.admonition, - .rst-content .wy-alert-info.admonition-todo, - .rst-content .wy-alert-info.attention, - .rst-content .wy-alert-info.caution, - .rst-content .wy-alert-info.danger, - .rst-content .wy-alert-info.error, - .rst-content .wy-alert-info.hint, - .rst-content .wy-alert-info.important, - .rst-content .wy-alert-info.tip, - .rst-content .wy-alert-info.warning, - .wy-alert.wy-alert-info { - background-color: rgb(26, 28, 29); - background-image: none; - } - .rst-content .note .admonition-title, - .rst-content .note .wy-alert-title, - .rst-content .seealso .admonition-title, - .rst-content .seealso .wy-alert-title, - .rst-content .wy-alert-info.admonition-todo .admonition-title, - .rst-content .wy-alert-info.admonition-todo .wy-alert-title, - .rst-content .wy-alert-info.admonition .admonition-title, - .rst-content .wy-alert-info.admonition .wy-alert-title, - .rst-content .wy-alert-info.attention .admonition-title, - .rst-content .wy-alert-info.attention .wy-alert-title, - .rst-content .wy-alert-info.caution .admonition-title, - .rst-content .wy-alert-info.caution .wy-alert-title, - .rst-content .wy-alert-info.danger .admonition-title, - .rst-content .wy-alert-info.danger .wy-alert-title, - .rst-content .wy-alert-info.error .admonition-title, - .rst-content .wy-alert-info.error .wy-alert-title, - .rst-content .wy-alert-info.hint .admonition-title, - .rst-content .wy-alert-info.hint .wy-alert-title, - .rst-content .wy-alert-info.important .admonition-title, - .rst-content .wy-alert-info.important .wy-alert-title, - .rst-content .wy-alert-info.tip .admonition-title, - .rst-content .wy-alert-info.tip .wy-alert-title, - .rst-content .wy-alert-info.warning .admonition-title, - .rst-content .wy-alert-info.warning .wy-alert-title, - .rst-content .wy-alert.wy-alert-info .admonition-title, - .wy-alert.wy-alert-info .rst-content .admonition-title, - .wy-alert.wy-alert-info .wy-alert-title { - background-color: rgb(23, 73, 105); - background-image: none; - } - .rst-content .hint, - .rst-content .important, - .rst-content .tip, - .rst-content .wy-alert-success.admonition, - .rst-content .wy-alert-success.admonition-todo, - .rst-content .wy-alert-success.attention, - .rst-content .wy-alert-success.caution, - .rst-content .wy-alert-success.danger, - .rst-content .wy-alert-success.error, - .rst-content .wy-alert-success.note, - .rst-content .wy-alert-success.seealso, - .rst-content .wy-alert-success.warning, - .wy-alert.wy-alert-success { - background-color: rgb(7, 53, 46); - background-image: none; - } - .rst-content .hint .admonition-title, - .rst-content .hint .wy-alert-title, - .rst-content .important .admonition-title, - .rst-content .important .wy-alert-title, - .rst-content .tip .admonition-title, - .rst-content .tip .wy-alert-title, - .rst-content .wy-alert-success.admonition-todo .admonition-title, - .rst-content .wy-alert-success.admonition-todo .wy-alert-title, - .rst-content .wy-alert-success.admonition .admonition-title, - .rst-content .wy-alert-success.admonition .wy-alert-title, - .rst-content .wy-alert-success.attention .admonition-title, - .rst-content .wy-alert-success.attention .wy-alert-title, - .rst-content .wy-alert-success.caution .admonition-title, - .rst-content .wy-alert-success.caution .wy-alert-title, - .rst-content .wy-alert-success.danger .admonition-title, - .rst-content .wy-alert-success.danger .wy-alert-title, - .rst-content .wy-alert-success.error .admonition-title, - .rst-content .wy-alert-success.error .wy-alert-title, - .rst-content .wy-alert-success.note .admonition-title, - .rst-content .wy-alert-success.note .wy-alert-title, - .rst-content .wy-alert-success.seealso .admonition-title, - .rst-content .wy-alert-success.seealso .wy-alert-title, - .rst-content .wy-alert-success.warning .admonition-title, - .rst-content .wy-alert-success.warning .wy-alert-title, - .rst-content .wy-alert.wy-alert-success .admonition-title, - .wy-alert.wy-alert-success .rst-content .admonition-title, - .wy-alert.wy-alert-success .wy-alert-title { - background-color: rgb(17, 120, 100); - background-image: none; - } - .rst-content .wy-alert-neutral.admonition, - .rst-content .wy-alert-neutral.admonition-todo, - .rst-content .wy-alert-neutral.attention, - .rst-content .wy-alert-neutral.caution, - .rst-content .wy-alert-neutral.danger, - .rst-content .wy-alert-neutral.error, - .rst-content .wy-alert-neutral.hint, - .rst-content .wy-alert-neutral.important, - .rst-content .wy-alert-neutral.note, - .rst-content .wy-alert-neutral.seealso, - .rst-content .wy-alert-neutral.tip, - .rst-content .wy-alert-neutral.warning, - .wy-alert.wy-alert-neutral { - background-color: rgb(22, 29, 29); - background-image: none; - } - .rst-content .wy-alert-neutral.admonition-todo .admonition-title, - .rst-content .wy-alert-neutral.admonition-todo .wy-alert-title, - .rst-content .wy-alert-neutral.admonition .admonition-title, - .rst-content .wy-alert-neutral.admonition .wy-alert-title, - .rst-content .wy-alert-neutral.attention .admonition-title, - .rst-content .wy-alert-neutral.attention .wy-alert-title, - .rst-content .wy-alert-neutral.caution .admonition-title, - .rst-content .wy-alert-neutral.caution .wy-alert-title, - .rst-content .wy-alert-neutral.danger .admonition-title, - .rst-content .wy-alert-neutral.danger .wy-alert-title, - .rst-content .wy-alert-neutral.error .admonition-title, - .rst-content .wy-alert-neutral.error .wy-alert-title, - .rst-content .wy-alert-neutral.hint .admonition-title, - .rst-content .wy-alert-neutral.hint .wy-alert-title, - .rst-content .wy-alert-neutral.important .admonition-title, - .rst-content .wy-alert-neutral.important .wy-alert-title, - .rst-content .wy-alert-neutral.note .admonition-title, - .rst-content .wy-alert-neutral.note .wy-alert-title, - .rst-content .wy-alert-neutral.seealso .admonition-title, - .rst-content .wy-alert-neutral.seealso .wy-alert-title, - .rst-content .wy-alert-neutral.tip .admonition-title, - .rst-content .wy-alert-neutral.tip .wy-alert-title, - .rst-content .wy-alert-neutral.warning .admonition-title, - .rst-content .wy-alert-neutral.warning .wy-alert-title, - .rst-content .wy-alert.wy-alert-neutral .admonition-title, - .wy-alert.wy-alert-neutral .rst-content .admonition-title, - .wy-alert.wy-alert-neutral .wy-alert-title { - color: rgb(188, 182, 173); - background-color: rgb(32, 35, 36); - background-image: none; - } - .rst-content .wy-alert-neutral.admonition-todo a, - .rst-content .wy-alert-neutral.admonition a, - .rst-content .wy-alert-neutral.attention a, - .rst-content .wy-alert-neutral.caution a, - .rst-content .wy-alert-neutral.danger a, - .rst-content .wy-alert-neutral.error a, - .rst-content .wy-alert-neutral.hint a, - .rst-content .wy-alert-neutral.important a, - .rst-content .wy-alert-neutral.note a, - .rst-content .wy-alert-neutral.seealso a, - .rst-content .wy-alert-neutral.tip a, - .rst-content .wy-alert-neutral.warning a, - .wy-alert.wy-alert-neutral a { - color: rgb(94, 169, 219); - } - .wy-tray-container li { - background-color: transparent; - background-image: none; - color: rgb(216, 212, 207); - box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 5px 0px; - } - .wy-tray-container li.wy-tray-item-success { - background-color: rgb(25, 111, 62); - background-image: none; - } - .wy-tray-container li.wy-tray-item-info { - background-color: rgb(26, 82, 118); - background-image: none; - } - .wy-tray-container li.wy-tray-item-warning { - background-color: rgb(142, 75, 16); - background-image: none; - } - .wy-tray-container li.wy-tray-item-danger { - background-color: rgb(130, 26, 16); - background-image: none; - } - .btn { - color: rgb(216, 212, 207); - border-color: rgba(84, 91, 95, 0.1); - background-color: rgb(25, 111, 62); - text-decoration-color: currentcolor; - box-shadow: rgba(19, 21, 22, 0.5) 0px 1px 2px -1px inset, - rgba(0, 0, 0, 0.1) 0px -2px 0px 0px inset; - } - .btn-hover { - background-color: rgb(30, 91, 132); - background-image: none; - color: rgb(216, 212, 207); - } - .btn:hover { - background-color: rgb(28, 125, 69); - background-image: none; - color: rgb(216, 212, 207); - } - .btn:focus { - background-color: rgb(28, 125, 69); - background-image: none; - outline-color: currentcolor; - } - .btn:active { - box-shadow: rgba(0, 0, 0, 0.05) 0px -1px 0px 0px inset, - rgba(0, 0, 0, 0.1) 0px 2px 0px 0px inset; - } - .btn:visited { - color: rgb(216, 212, 207); - } - .btn-disabled, - .btn-disabled:active, - .btn-disabled:focus, - .btn-disabled:hover, - .btn:disabled { - background-image: none; - box-shadow: none; - } - .btn-info { - background-color: rgb(26, 82, 118) !important; - } - .btn-info:hover { - background-color: rgb(30, 91, 132) !important; - } - .btn-neutral { - background-color: rgb(22, 29, 29) !important; - color: rgb(188, 182, 173) !important; - } - .btn-neutral:hover { - color: rgb(188, 182, 173); - background-color: rgb(27, 35, 35) !important; - } - .btn-neutral:visited { - color: rgb(188, 182, 173) !important; - } - .btn-success { - background-color: rgb(25, 111, 62) !important; - } - .btn-success:hover { - background-color: rgb(22, 98, 54) !important; - } - .btn-danger { - background-color: rgb(130, 26, 16) !important; - } - .btn-danger:hover { - background-color: rgb(119, 24, 14) !important; - } - .btn-warning { - background-color: rgb(142, 75, 16) !important; - } - .btn-warning:hover { - background-color: rgb(132, 70, 14) !important; - } - .btn-invert { - background-color: rgb(21, 22, 23); - } - .btn-invert:hover { - background-color: rgb(28, 31, 32) !important; - } - .btn-link { - color: rgb(94, 169, 219); - box-shadow: none; - background-color: transparent !important; - border-color: transparent !important; - } - .btn-link:active, - .btn-link:hover { - box-shadow: none; - background-color: transparent !important; - color: rgb(90, 168, 218) !important; - } - .btn-link:visited { - color: rgb(170, 113, 192); - } - .wy-dropdown-menu { - background-color: rgb(21, 22, 23); - background-image: none; - border-color: rgb(119, 111, 98); - box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 2px 0px; - } - .wy-dropdown-menu > dd > a { - color: rgb(188, 182, 173); - } - .wy-dropdown-menu > dd > a:hover { - background-color: rgb(26, 82, 118); - background-image: none; - color: rgb(216, 212, 207); - } - .wy-dropdown-menu > dd.divider { - border-top-color: rgb(119, 111, 98); - } - .wy-dropdown-menu > dd.call-to-action { - background-color: rgb(32, 35, 36); - background-image: none; - } - .wy-dropdown-menu > dd.call-to-action:hover { - background-color: rgb(32, 35, 36); - background-image: none; - } - .wy-dropdown-menu > dd.call-to-action .btn { - color: rgb(216, 212, 207); - } - .wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu { - background-color: rgb(21, 22, 23); - background-image: none; - } - .wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover { - background-color: rgb(26, 82, 118); - background-image: none; - color: rgb(216, 212, 207); - } - .wy-dropdown-arrow::before { - border-bottom-color: rgb(122, 113, 100); - border-left-color: transparent; - border-right-color: transparent; - } - fieldset, - legend { - border-color: currentcolor; - } - label { - color: rgb(193, 188, 180); - } - .wy-control-group.wy-control-group-required > label::after { - color: rgb(234, 96, 82); - } - .wy-form-message-inline { - color: rgb(171, 164, 153); - } - .wy-form-message { - color: rgb(171, 164, 153); - } - input[type="color"], input[type="date"], input[type="datetime-local"], input[type="datetime"], input[type="email"], input[type="month"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"] { - border-color: rgb(118, 110, 97); - box-shadow: rgb(35, 38, 39) 0px 1px 3px inset; - } - input[type="color"]:focus, input[type="date"]:focus, input[type="datetime-local"]:focus, input[type="datetime"]:focus, input[type="email"]:focus, input[type="month"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="week"]:focus { - outline-color: currentcolor; - border-color: rgb(103, 96, 85); - } - input.no-focus:focus { - border-color: rgb(118, 110, 97) !important; - } - input[type="checkbox"]:focus, input[type="file"]:focus, input[type="radio"]:focus { - outline-color: rgb(15, 126, 186); - } - input[type="color"][disabled], input[type="date"][disabled], input[type="datetime-local"][disabled], input[type="datetime"][disabled], input[type="email"][disabled], input[type="month"][disabled], input[type="number"][disabled], input[type="password"][disabled], input[type="search"][disabled], input[type="tel"][disabled], input[type="text"][disabled], input[type="time"][disabled], input[type="url"][disabled], input[type="week"][disabled] { - background-color: rgb(21, 23, 24); - } - input:focus:invalid, - select:focus:invalid, - textarea:focus:invalid { - color: rgb(234, 96, 82); - border-color: rgb(183, 38, 22); - } - input:focus:invalid:focus, - select:focus:invalid:focus, - textarea:focus:invalid:focus { - border-color: rgb(183, 38, 22); - } - input[type="checkbox"]:focus:invalid:focus, input[type="file"]:focus:invalid:focus, input[type="radio"]:focus:invalid:focus { - outline-color: rgb(183, 38, 22); - } - select, - textarea { - border-color: rgb(118, 110, 97); - box-shadow: rgb(35, 38, 39) 0px 1px 3px inset; - } - select { - border-color: rgb(118, 110, 97); - background-color: rgb(19, 21, 22); - } - select:focus, - textarea:focus { - outline-color: currentcolor; - } - input[readonly], - select[disabled], - select[readonly], - textarea[disabled], - textarea[readonly] { - background-color: rgb(21, 23, 24); - } - .wy-checkbox, - .wy-radio { - color: rgb(188, 182, 173); - } - .wy-input-prefix .wy-input-context, - .wy-input-suffix .wy-input-context { - background-color: rgb(22, 29, 29); - border-color: rgb(118, 110, 97); - color: rgb(171, 164, 153); - } - .wy-input-suffix .wy-input-context { - border-left-color: currentcolor; - } - .wy-input-prefix .wy-input-context { - border-right-color: currentcolor; - } - .wy-switch::before { - background-color: rgb(42, 46, 47); - background-image: none; - } - .wy-switch::after { - background-color: rgb(66, 71, 74); - background-image: none; - } - .wy-switch span { - color: rgb(193, 188, 180); - } - .wy-switch.active::before { - background-color: rgb(19, 85, 46); - background-image: none; - } - .wy-switch.active::after { - background-color: rgb(25, 111, 62); - background-image: none; - } - .wy-control-group.wy-control-group-error .wy-form-message, - .wy-control-group.wy-control-group-error > label { - color: rgb(234, 96, 82); - } - .wy-control-group.wy-control-group-error input[type="color"], .wy-control-group.wy-control-group-error input[type="date"], .wy-control-group.wy-control-group-error input[type="datetime-local"], .wy-control-group.wy-control-group-error input[type="datetime"], .wy-control-group.wy-control-group-error input[type="email"], .wy-control-group.wy-control-group-error input[type="month"], .wy-control-group.wy-control-group-error input[type="number"], .wy-control-group.wy-control-group-error input[type="password"], .wy-control-group.wy-control-group-error input[type="search"], .wy-control-group.wy-control-group-error input[type="tel"], .wy-control-group.wy-control-group-error input[type="text"], .wy-control-group.wy-control-group-error input[type="time"], .wy-control-group.wy-control-group-error input[type="url"], .wy-control-group.wy-control-group-error input[type="week"], - .wy-control-group.wy-control-group-error textarea { - border-color: rgb(183, 38, 22); - } - .wy-inline-validate.wy-inline-validate-success .wy-input-context { - color: rgb(99, 220, 150); - } - .wy-inline-validate.wy-inline-validate-danger .wy-input-context { - color: rgb(234, 96, 82); - } - .wy-inline-validate.wy-inline-validate-warning .wy-input-context { - color: rgb(234, 146, 69); - } - .wy-inline-validate.wy-inline-validate-info .wy-input-context { - color: rgb(94, 169, 219); - } - .rst-content table.docutils caption, - .rst-content table.field-list caption, - .wy-table caption { - color: rgb(216, 212, 207); - } - .rst-content table.docutils thead, - .rst-content table.field-list thead, - .wy-table thead { - color: rgb(216, 212, 207); - } - .rst-content table.docutils thead th, - .rst-content table.field-list thead th, - .wy-table thead th { - border-bottom-color: rgb(120, 112, 99); - } - .rst-content table.docutils td, - .rst-content table.field-list td, - .wy-table td { - background-color: transparent; - } - .wy-table-secondary { - color: rgb(160, 151, 139); - } - .wy-table-tertiary { - color: rgb(160, 151, 139); - } - .rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td, - .wy-table-backed, - .wy-table-odd td, - .wy-table-striped tr:nth-child(2n-1) td { - background-color: rgb(22, 29, 29); - } - .rst-content table.docutils, - .wy-table-bordered-all { - border-color: rgb(120, 112, 99); - } - .rst-content table.docutils td, - .wy-table-bordered-all td { - border-bottom-color: rgb(120, 112, 99); - border-left-color: rgb(120, 112, 99); - } - .wy-table-bordered { - border-color: rgb(120, 112, 99); - } - .wy-table-bordered-rows td { - border-bottom-color: rgb(120, 112, 99); - } - .wy-table-horizontal td, - .wy-table-horizontal th { - border-bottom-color: rgb(120, 112, 99); - } - a { - color: rgb(94, 169, 219); - text-decoration-color: currentcolor; - } - a:hover { - color: rgb(82, 164, 217); - } - a:visited { - color: rgb(170, 113, 192); - } - body { - color: rgb(188, 182, 173); - background-color: rgb(26, 29, 30); - background-image: none; - } - .wy-text-strike { - text-decoration-color: currentcolor; - } - .wy-text-warning { - color: rgb(234, 146, 69) !important; - } - a.wy-text-warning:hover { - color: rgb(237, 160, 92) !important; - } - .wy-text-info { - color: rgb(94, 169, 219) !important; - } - a.wy-text-info:hover { - color: rgb(90, 168, 218) !important; - } - .wy-text-success { - color: rgb(99, 220, 150) !important; - } - a.wy-text-success:hover { - color: rgb(86, 217, 142) !important; - } - .wy-text-danger { - color: rgb(234, 96, 82) !important; - } - a.wy-text-danger:hover { - color: rgb(237, 118, 104) !important; - } - .wy-text-neutral { - color: rgb(188, 182, 173) !important; - } - a.wy-text-neutral:hover { - color: rgb(177, 170, 160) !important; - } - hr { - border-color: rgb(120, 112, 99) currentcolor currentcolor; - } - .rst-content code, - .rst-content tt, - code { - background-color: rgb(19, 21, 22); - background-image: none; - border-color: rgb(120, 112, 99); - color: rgb(234, 96, 82); - } - .rst-content .section ul, - .rst-content .toctree-wrapper ul, - .wy-plain-list-disc, - article ul { - list-style-image: none; - } - .rst-content .section ul li, - .rst-content .toctree-wrapper ul li, - .wy-plain-list-disc li, - article ul li { - list-style-image: none; - } - .rst-content .section ul li li, - .rst-content .toctree-wrapper ul li li, - .wy-plain-list-disc li li, - article ul li li { - list-style-image: none; - } - .rst-content .section ul li li li, - .rst-content .toctree-wrapper ul li li li, - .wy-plain-list-disc li li li, - article ul li li li { - list-style-image: none; - } - .rst-content .section ul li ol li, - .rst-content .toctree-wrapper ul li ol li, - .wy-plain-list-disc li ol li, - article ul li ol li { - list-style-image: none; - } - .rst-content .section ol, - .rst-content ol.arabic, - .wy-plain-list-decimal, - article ol { - list-style-image: none; - } - .rst-content .section ol li, - .rst-content ol.arabic li, - .wy-plain-list-decimal li, - article ol li { - list-style-image: none; - } - .rst-content .section ol li ul li, - .rst-content ol.arabic li ul li, - .wy-plain-list-decimal li ul li, - article ol li ul li { - list-style-image: none; - } - .rst-content .wy-breadcrumbs li tt, - .wy-breadcrumbs li .rst-content tt, - .wy-breadcrumbs li code { - border-color: currentcolor; - background-color: rgba(0, 0, 0, 0); - background-image: none; - } - .rst-content .wy-breadcrumbs li tt.literal, - .wy-breadcrumbs li .rst-content tt.literal, - .wy-breadcrumbs li code.literal { - color: rgb(188, 182, 173); - } - .wy-breadcrumbs-extra { - color: rgb(182, 176, 167); - } - .wy-menu a:hover { - text-decoration-color: currentcolor; - } - .wy-menu-horiz li:hover { - background-color: rgba(19, 21, 22, 0.1); - background-image: none; - } - .wy-menu-horiz li.divide-left { - border-left-color: rgb(104, 97, 86); - } - .wy-menu-horiz li.divide-right { - border-right-color: rgb(104, 97, 86); - } - .wy-menu-vertical header, - .wy-menu-vertical p.caption { - color: rgb(101, 173, 220); - } - .wy-menu-vertical li.divide-top { - border-top-color: rgb(104, 97, 86); - } - .wy-menu-vertical li.divide-bottom { - border-bottom-color: rgb(104, 97, 86); - } - .wy-menu-vertical li.current { - background-color: rgb(32, 35, 36); - background-image: none; - } - .wy-menu-vertical li.current a { - color: rgb(160, 151, 139); - border-right-color: rgb(118, 110, 97); - } - .wy-menu-vertical li.current a:hover { - background-color: rgb(38, 41, 42); - background-image: none; - } - .rst-content .wy-menu-vertical li tt, - .wy-menu-vertical li .rst-content tt, - .wy-menu-vertical li code { - border-color: currentcolor; - background-color: inherit; - background-image: inherit; - color: inherit; - } - .wy-menu-vertical li span.toctree-expand { - color: rgb(182, 175, 166); - } - .wy-menu-vertical li.current > a, - .wy-menu-vertical li.on a { - color: rgb(188, 182, 173); - background-color: rgb(21, 22, 23); - background-image: none; - border-color: currentcolor; - } - .wy-menu-vertical li.current > a:hover, - .wy-menu-vertical li.on a:hover { - background-color: rgb(21, 22, 23); - background-image: none; - } - .wy-menu-vertical li.current > a:hover span.toctree-expand, - .wy-menu-vertical li.on a:hover span.toctree-expand { - color: rgb(160, 151, 139); - } - .wy-menu-vertical li.current > a span.toctree-expand, - .wy-menu-vertical li.on a span.toctree-expand { - color: rgb(193, 188, 180); - } - .wy-menu-vertical li.toctree-l1.current > a { - border-bottom-color: rgb(118, 110, 97); - border-top-color: rgb(118, 110, 97); - } - .wy-menu-vertical li.toctree-l2 a, - .wy-menu-vertical li.toctree-l3 a, - .wy-menu-vertical li.toctree-l4 a, - .wy-menu-vertical li.toctree-l5 a, - .wy-menu-vertical li.toctree-l6 a, - .wy-menu-vertical li.toctree-l7 a, - .wy-menu-vertical li.toctree-l8 a, - .wy-menu-vertical li.toctree-l9 a, - .wy-menu-vertical li.toctree-l10 a { - color: rgb(188, 182, 173); - } - .wy-menu-vertical li.toctree-l2 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l3 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l4 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l5 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l6 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l7 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l8 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l9 a:hover span.toctree-expand, - .wy-menu-vertical li.toctree-l10 a:hover span.toctree-expand { - color: rgb(160, 151, 139); - } - .wy-menu-vertical li.toctree-l2.current > a, - .wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a { - background-color: rgb(43, 47, 49); - background-image: none; - } - .wy-menu-vertical li.toctree-l2 span.toctree-expand { - color: rgb(175, 168, 158); - } - .wy-menu-vertical li.toctree-l3.current > a, - .wy-menu-vertical li.toctree-l3.current li.toctree-l4 > a { - background-color: rgb(49, 53, 55); - background-image: none; - } - .wy-menu-vertical li.toctree-l3 span.toctree-expand { - color: rgb(169, 162, 151); - } - .wy-menu-vertical li ul li a { - color: rgb(199, 194, 187); - } - .wy-menu-vertical a { - color: rgb(199, 194, 187); - } - .wy-menu-vertical a:hover { - background-color: rgb(46, 49, 51); - } - .wy-menu-vertical a:hover span.toctree-expand { - color: rgb(199, 194, 187); - } - .wy-menu-vertical a:active { - background-color: rgb(26, 82, 118); - color: rgb(216, 212, 207); - } - .wy-menu-vertical a:active span.toctree-expand { - color: rgb(216, 212, 207); - } - .wy-side-nav-search { - background-color: rgb(26, 82, 118); - color: rgb(215, 211, 206); - } - .wy-side-nav-search input[type="text"] { - border-color: rgb(35, 112, 161); - } - .wy-side-nav-search img { - background-color: rgb(26, 82, 118); - } - .wy-side-nav-search .wy-dropdown > a, - .wy-side-nav-search > a { - color: rgb(215, 211, 206); - } - .wy-side-nav-search .wy-dropdown > a:hover, - .wy-side-nav-search > a:hover { - background-color: rgba(19, 21, 22, 0.1); - background-image: none; - } - .wy-side-nav-search .wy-dropdown > a img.logo, - .wy-side-nav-search > a img.logo { - background-color: transparent; - background-image: none; - } - .wy-side-nav-search > div.version { - color: rgba(216, 212, 207, 0.3); - } - .wy-nav .wy-menu-vertical header { - color: rgb(94, 169, 219); - } - .wy-nav .wy-menu-vertical a { - color: rgb(182, 176, 167); - } - .wy-nav .wy-menu-vertical a:hover { - background-color: rgb(26, 82, 118); - color: rgb(216, 212, 207); - } - .wy-body-for-nav { - background-color: rgb(21, 22, 23); - background-image: none; - } - .wy-nav-side { - color: rgb(172, 164, 154); - background-color: rgb(30, 33, 34); - background-image: none; - } - .wy-nav-top { - background-color: rgb(26, 82, 118); - background-image: none; - color: rgb(216, 212, 207); - } - .wy-nav-top a { - color: rgb(216, 212, 207); - } - .wy-nav-top img { - background-color: rgb(26, 82, 118); - } - .wy-nav-content-wrap { - background-color: rgb(21, 22, 23); - background-image: none; - } - .wy-body-mask { - background-color: rgba(0, 0, 0, 0.2); - background-image: none; - } - footer { - color: rgb(160, 151, 139); - } - .rst-content footer span.commit tt, - footer span.commit .rst-content tt, - footer span.commit code { - background-color: rgba(0, 0, 0, 0); - background-image: none; - border-color: currentcolor; - color: rgb(160, 151, 139); - } - #search-results .search li { - border-bottom-color: rgb(120, 112, 99); - } - #search-results .search li:first-child { - border-top-color: rgb(120, 112, 99); - } - #search-results .context { - color: rgb(160, 151, 139); - } - .wy-body-for-nav { - background-color: rgb(21, 22, 23); - background-image: none; - } - @media screen and (min-width: 1100px) { - .wy-nav-content-wrap { - background-color: rgba(0, 0, 0, 0.05); - background-image: none; - } - .wy-nav-content { - background-color: rgb(21, 22, 23); - background-image: none; - } - } - .rst-versions { - color: rgb(215, 211, 206); - background-color: rgb(18, 20, 20); - background-image: none; - } - .rst-versions a { - color: rgb(94, 169, 219); - text-decoration-color: currentcolor; - } - .rst-versions .rst-current-version { - background-color: rgb(23, 25, 26); - color: rgb(99, 220, 150); - } - .rst-content .code-block-caption .rst-versions .rst-current-version .headerlink, - .rst-content .rst-versions .rst-current-version .admonition-title, - .rst-content code.download .rst-versions .rst-current-version span:first-child, - .rst-content dl dt .rst-versions .rst-current-version .headerlink, - .rst-content h1 .rst-versions .rst-current-version .headerlink, - .rst-content h2 .rst-versions .rst-current-version .headerlink, - .rst-content h3 .rst-versions .rst-current-version .headerlink, - .rst-content h4 .rst-versions .rst-current-version .headerlink, - .rst-content h5 .rst-versions .rst-current-version .headerlink, - .rst-content h6 .rst-versions .rst-current-version .headerlink, - .rst-content p.caption .rst-versions .rst-current-version .headerlink, - .rst-content table > caption .rst-versions .rst-current-version .headerlink, - .rst-content tt.download .rst-versions .rst-current-version span:first-child, - .rst-versions .rst-current-version .fa, - .rst-versions .rst-current-version .icon, - .rst-versions .rst-current-version .rst-content .admonition-title, - .rst-versions .rst-current-version .rst-content .code-block-caption .headerlink, - .rst-versions .rst-current-version .rst-content code.download span:first-child, - .rst-versions .rst-current-version .rst-content dl dt .headerlink, - .rst-versions .rst-current-version .rst-content h1 .headerlink, - .rst-versions .rst-current-version .rst-content h2 .headerlink, - .rst-versions .rst-current-version .rst-content h3 .headerlink, - .rst-versions .rst-current-version .rst-content h4 .headerlink, - .rst-versions .rst-current-version .rst-content h5 .headerlink, - .rst-versions .rst-current-version .rst-content h6 .headerlink, - .rst-versions .rst-current-version .rst-content p.caption .headerlink, - .rst-versions .rst-current-version .rst-content table > caption .headerlink, - .rst-versions .rst-current-version .rst-content tt.download span:first-child, - .rst-versions .rst-current-version .wy-menu-vertical li span.toctree-expand, - .wy-menu-vertical li .rst-versions .rst-current-version span.toctree-expand { - color: rgb(215, 211, 206); - } - .rst-versions .rst-current-version.rst-out-of-date { - background-color: rgb(130, 26, 16); - color: rgb(216, 212, 207); - } - .rst-versions .rst-current-version.rst-active-old-version { - background-color: rgb(154, 125, 9); - color: rgb(216, 212, 207); - } - .rst-versions .rst-other-versions { - color: rgb(160, 151, 139); - } - .rst-versions .rst-other-versions hr { - border-color: rgb(104, 97, 86) currentcolor currentcolor; - } - .rst-versions .rst-other-versions dd a { - color: rgb(215, 211, 206); - } - .rst-versions.rst-badge { - border-color: currentcolor; - } - .rst-content abbr[title] { - text-decoration-color: currentcolor; - } - .rst-content.style-external-links a.reference.external::after { - color: rgb(182, 176, 167); - } - .rst-content div[class^="highlight"], - .rst-content pre.literal-block { - border-color: rgb(120, 112, 99); - } - .rst-content div[class^="highlight"] div[class^="highlight"], .rst-content pre.literal-block div[class^="highlight"] { - border-color: currentcolor; - } - .rst-content .linenodiv pre { - border-right-color: rgb(121, 112, 99); - } - .rst-content .admonition table { - border-color: rgba(84, 91, 95, 0.1); - } - .rst-content .admonition table td, - .rst-content .admonition table th { - background-color: transparent !important; - background-image: none !important; - border-color: rgba(84, 91, 95, 0.1) !important; - } - .rst-content .section ol.loweralpha, - .rst-content .section ol.loweralpha > li { - list-style-image: none; - } - .rst-content .section ol.upperalpha, - .rst-content .section ol.upperalpha > li { - list-style-image: none; - } - .rst-content .toc-backref { - color: rgb(188, 182, 173); - } - .rst-content .sidebar { - background-color: rgb(22, 29, 29); - background-image: none; - border-color: rgb(120, 112, 99); - } - .rst-content .sidebar .sidebar-title { - background-color: rgb(32, 35, 36); - background-image: none; - } - .rst-content .highlighted { - background-color: rgb(154, 125, 9); - background-image: none; - box-shadow: rgb(154, 125, 9) 0px 0px 0px 2px; - } - html.writer-html4 .rst-content table.docutils.citation, - html.writer-html4 .rst-content table.docutils.footnote { - background-color: rgba(0, 0, 0, 0); - background-image: none; - border-color: currentcolor; - } - html.writer-html4 .rst-content table.docutils.citation td, - html.writer-html4 .rst-content table.docutils.citation tr, - html.writer-html4 .rst-content table.docutils.footnote td, - html.writer-html4 .rst-content table.docutils.footnote tr { - border-color: currentcolor; - background-color: transparent !important; - } - .rst-content table.docutils.footnote, - html.writer-html4 .rst-content table.docutils.citation, - html.writer-html5 .rst-content dl.footnote { - color: rgb(160, 151, 139); - } - .rst-content table.docutils.footnote code, - .rst-content table.docutils.footnote tt, - html.writer-html4 .rst-content table.docutils.citation code, - html.writer-html4 .rst-content table.docutils.citation tt, - html.writer-html5 .rst-content dl.footnote code, - html.writer-html5 .rst-content dl.footnote tt { - color: rgb(178, 172, 162); - } - .rst-content table.docutils th { - border-color: rgb(120, 112, 99); - } - html.writer-html5 .rst-content table.docutils th { - border-color: rgb(120, 112, 99); - } - .rst-content table.field-list, - .rst-content table.field-list td { - border-color: currentcolor; - } - .rst-content code, - .rst-content tt { - color: rgb(216, 212, 207); - } - .rst-content code.literal, - .rst-content tt.literal { - color: rgb(227, 134, 124); - } - .rst-content code.xref, - .rst-content tt.xref, - a .rst-content code, - a .rst-content tt { - color: rgb(188, 182, 173); - } - .rst-content a code, - .rst-content a tt { - color: rgb(94, 169, 219); - } - html.writer-html4 .rst-content dl:not(.docutils) > dt, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) > dt { - background-color: rgb(26, 28, 29); - background-image: none; - color: rgb(94, 169, 219); - border-top-color: rgb(37, 119, 171); - } - html.writer-html4 .rst-content dl:not(.docutils) > dt::before, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) > dt::before { - color: rgb(111, 179, 223); - } - html.writer-html4 .rst-content dl:not(.docutils) > dt .headerlink, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) > dt .headerlink { - color: rgb(188, 182, 173); - } - html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list) > dt, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list) > dt { - border-color: currentcolor currentcolor currentcolor rgb(118, 110, 97); - background-color: rgb(26, 28, 29); - background-image: none; - color: rgb(178, 172, 162); - } - html.writer-html4 .rst-content dl:not(.docutils) dl:not(.field-list) > dt .headerlink, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dl:not(.field-list) > dt .headerlink { - color: rgb(188, 182, 173); - } - html.writer-html4 .rst-content dl:not(.docutils) code.descclassname, - html.writer-html4 .rst-content dl:not(.docutils) code.descname, - html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname, - html.writer-html4 .rst-content dl:not(.docutils) tt.descname, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descclassname, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) code.descname, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descclassname, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) tt.descname { - background-color: transparent; - border-color: currentcolor; - } - html.writer-html4 .rst-content dl:not(.docutils) .optional, - html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .optional { - color: rgb(216, 212, 207); - } - .rst-content .viewcode-back, - .rst-content .viewcode-link { - color: rgb(99, 220, 150); - } - .rst-content code.download, - .rst-content tt.download { - background-color: inherit; - background-image: inherit; - color: inherit; - border-color: inherit; - } - .rst-content .guilabel { - border-color: rgb(38, 119, 172); - background-color: rgb(26, 28, 29); background-image: none; - } - span[id*="MathJax-Span"] { - color: rgb(188, 182, 173); - } - td.linenos .normal { - color: inherit; - background-color: transparent; - } - span.linenos { - color: inherit; - background-color: transparent; - } - td.linenos .special { - color: rgb(216, 212, 207); - background-color: rgb(71, 71, 0); - } - span.linenos.special { - color: rgb(216, 212, 207); - background-color: rgb(71, 71, 0); - } - .highlight .hll { - background-color: rgb(66, 66, 0); - } - .highlight { - background-color: rgb(32, 34, 36); - background-image: none; - } - .highlight .c { - color: rgb(124, 182, 197); - } - .highlight .err { - border-color: rgb(201, 0, 0); - } - .highlight .k { - color: rgb(114, 255, 154); - } - .highlight .o { - color: rgb(171, 164, 153); - } - .highlight .ch { - color: rgb(124, 182, 197); - } - .highlight .cm { - color: rgb(124, 182, 197); - } - .highlight .cp { - color: rgb(114, 255, 154); - } - .highlight .cpf { - color: rgb(124, 182, 197); - } - .highlight .c1 { - color: rgb(124, 182, 197); - } - .highlight .cs { - color: rgb(124, 182, 197); - background-color: rgb(48, 0, 0); - } - .highlight .gd { - color: rgb(255, 90, 90); - } - .highlight .gr { - color: rgb(255, 44, 44); - } - .highlight .gh { - color: rgb(114, 185, 255); - } - .highlight .gi { - color: rgb(90, 255, 90); - } - .highlight .go { - color: rgb(193, 188, 180); - } - .highlight .gp { - color: rgb(246, 151, 75); - } - .highlight .gu { - color: rgb(255, 105, 255); - } - .highlight .gt { - color: rgb(75, 173, 255); - } - .highlight .kc { - color: rgb(114, 255, 154); - } - .highlight .kd { - color: rgb(114, 255, 154); - } - .highlight .kn { - color: rgb(114, 255, 154); - } - .highlight .kp { - color: rgb(114, 255, 154); - } - .highlight .kr { - color: rgb(114, 255, 154); - } - .highlight .kt { - color: rgb(255, 133, 98); - } - .highlight .m { - color: rgb(123, 222, 173); - } - .highlight .s { - color: rgb(126, 170, 203); - } - .highlight .na { - color: rgb(126, 170, 203); - } - .highlight .nb { - color: rgb(114, 255, 154); - } - .highlight .nc { - color: rgb(86, 196, 242); - } - .highlight .no { - color: rgb(108, 180, 216); - } - .highlight .nd { - color: rgb(178, 172, 162); - } - .highlight .ni { - color: rgb(220, 111, 85); - } - .highlight .ne { - color: rgb(114, 255, 154); - } - .highlight .nf { - color: rgb(120, 189, 248); - } - .highlight .nl { - color: rgb(121, 194, 255); - } - .highlight .nn { - color: rgb(86, 196, 242); - } - .highlight .nt { - color: rgb(125, 192, 248); - } - .highlight .nv { - color: rgb(192, 108, 216); - } - .highlight .ow { - color: rgb(114, 255, 154); - } - .highlight .w { - color: rgb(186, 180, 171); - } - .highlight .mb { - color: rgb(123, 222, 173); - } - .highlight .mf { - color: rgb(123, 222, 173); - } - .highlight .mh { - color: rgb(123, 222, 173); - } - .highlight .mi { - color: rgb(123, 222, 173); - } - .highlight .mo { - color: rgb(123, 222, 173); - } - .highlight .sa { - color: rgb(126, 170, 203); - } - .highlight .sb { - color: rgb(126, 170, 203); - } - .highlight .sc { - color: rgb(126, 170, 203); - } - .highlight .dl { - color: rgb(126, 170, 203); - } - .highlight .sd { - color: rgb(126, 170, 203); - } - .highlight .s2 { - color: rgb(126, 170, 203); - } - .highlight .se { - color: rgb(126, 170, 203); - } - .highlight .sh { - color: rgb(126, 170, 203); - } - .highlight .si { - color: rgb(120, 172, 210); - } - .highlight .sx { - color: rgb(246, 151, 75); - } - .highlight .sr { - color: rgb(129, 182, 223); - } - .highlight .s1 { - color: rgb(126, 170, 203); - } - .highlight .ss { - color: rgb(186, 229, 123); - } - .highlight .bp { - color: rgb(114, 255, 154); - } - .highlight .fm { - color: rgb(120, 189, 248); - } - .highlight .vc { - color: rgb(192, 108, 216); - } - .highlight .vg { - color: rgb(192, 108, 216); - } - .highlight .vi { - color: rgb(192, 108, 216); - } - .highlight .vm { - color: rgb(192, 108, 216); - } - .highlight .il { - color: rgb(123, 222, 173); - } - .rst-other-versions a { - border-color: currentcolor; - } - .ethical-sidebar .ethical-image-link, - .ethical-footer .ethical-image-link { - border-color: currentcolor; - } - .ethical-sidebar, - .ethical-footer { - background-color: rgb(27, 29, 30); - border-color: rgb(118, 110, 97); - color: rgb(211, 208, 202); - } - .ethical-sidebar ul { - list-style-image: none; - } - .ethical-sidebar ul li { - background-color: rgb(4, 62, 97); - color: rgb(216, 212, 207); - } - .ethical-sidebar a, - .ethical-sidebar a:visited, - .ethical-sidebar a:hover, - .ethical-sidebar a:active, - .ethical-footer a, - .ethical-footer a:visited, - .ethical-footer a:hover, - .ethical-footer a:active { - color: rgb(211, 208, 202); - text-decoration-color: currentcolor !important; - border-bottom-color: currentcolor !important; - } - .ethical-callout a { - color: rgb(166, 159, 147) !important; - text-decoration-color: currentcolor !important; - } - .ethical-fixedfooter { - background-color: rgb(27, 29, 30); - border-top-color: rgb(117, 109, 96); - color: rgb(188, 182, 173); - } - .ethical-fixedfooter .ethical-text::before { - background-color: rgb(49, 112, 51); - color: rgb(216, 212, 207); - } - .ethical-fixedfooter .ethical-callout { - color: rgb(171, 164, 153); - } - .ethical-fixedfooter a, - .ethical-fixedfooter a:hover, - .ethical-fixedfooter a:active, - .ethical-fixedfooter a:visited { - color: rgb(188, 182, 173); - text-decoration-color: currentcolor; - } - .ethical-rtd .ethical-sidebar { - color: rgb(182, 176, 167); - } - .ethical-alabaster a.ethical-image-link { - border-color: currentcolor !important; - } - .ethical-dark-theme .ethical-sidebar { - background-color: rgb(46, 50, 52); - border-color: rgb(114, 106, 93); - color: rgb(189, 183, 174) !important; - } - .ethical-dark-theme a, - .ethical-dark-theme a:visited { - color: rgb(205, 200, 194) !important; - border-bottom-color: currentcolor !important; - } - .ethical-dark-theme .ethical-callout a { - color: rgb(182, 176, 167) !important; - } - .keep-us-sustainable { - border-color: rgb(104, 158, 45); - } - .keep-us-sustainable a, - .keep-us-sustainable a:hover, - .keep-us-sustainable a:visited { - text-decoration-color: currentcolor; - } - .wy-nav-side .keep-us-sustainable { - color: rgb(182, 176, 167); - } - .wy-nav-side .keep-us-sustainable a { - color: rgb(209, 205, 199); - } - [data-ea-publisher].loaded a, - [data-ea-type].loaded a { - text-decoration-color: currentcolor; - } - [data-ea-publisher].loaded .ea-content, - [data-ea-type].loaded .ea-content { - background-color: rgba(0, 0, 0, 0.03); - background-image: none; - color: rgb(181, 174, 164); - } - [data-ea-publisher].loaded .ea-content a:link, - [data-ea-type].loaded .ea-content a:link { - color: rgb(181, 174, 164); - } - [data-ea-publisher].loaded .ea-content a:visited, - [data-ea-type].loaded .ea-content a:visited { - color: rgb(181, 174, 164); - } - [data-ea-publisher].loaded .ea-content a:hover, - [data-ea-type].loaded .ea-content a:hover { - color: rgb(192, 186, 178); - } - [data-ea-publisher].loaded .ea-content a:active, - [data-ea-type].loaded .ea-content a:active { - color: rgb(192, 186, 178); - } - [data-ea-publisher].loaded .ea-content a strong, - [data-ea-publisher].loaded .ea-content a b, - [data-ea-type].loaded .ea-content a strong, - [data-ea-type].loaded .ea-content a b { - color: rgb(64, 180, 248); - } - [data-ea-publisher].loaded .ea-callout a:link, - [data-ea-type].loaded .ea-callout a:link { - color: rgb(169, 162, 151); - } - [data-ea-publisher].loaded .ea-callout a:visited, - [data-ea-type].loaded .ea-callout a:visited { - color: rgb(169, 162, 151); - } - [data-ea-publisher].loaded .ea-callout a:hover, - [data-ea-type].loaded .ea-callout a:hover { - color: rgb(181, 174, 164); - } - [data-ea-publisher].loaded .ea-callout a:active, - [data-ea-type].loaded .ea-callout a:active { - color: rgb(181, 174, 164); - } - [data-ea-publisher].loaded .ea-callout a strong, - [data-ea-publisher].loaded .ea-callout a b, - [data-ea-type].loaded .ea-callout a strong, - [data-ea-type].loaded .ea-callout a b { - color: rgb(64, 180, 248); - } - [data-ea-publisher].loaded.dark .ea-content, - [data-ea-type].loaded.dark .ea-content { - background-color: rgba(19, 21, 22, 0.05); - background-image: none; - color: rgb(200, 196, 189); - } - [data-ea-publisher].loaded.dark .ea-content a:link, - [data-ea-type].loaded.dark .ea-content a:link { - color: rgb(200, 196, 189); - } - [data-ea-publisher].loaded.dark .ea-content a:visited, - [data-ea-type].loaded.dark .ea-content a:visited { - color: rgb(200, 196, 189); - } - [data-ea-publisher].loaded.dark .ea-content a:hover, - [data-ea-type].loaded.dark .ea-content a:hover { - color: rgb(212, 208, 202); - } - [data-ea-publisher].loaded.dark .ea-content a:active, - [data-ea-type].loaded.dark .ea-content a:active { - color: rgb(212, 208, 202); - } - [data-ea-publisher].loaded.dark .ea-content a strong, - [data-ea-publisher].loaded.dark .ea-content a b, - [data-ea-type].loaded.dark .ea-content a strong, - [data-ea-type].loaded.dark .ea-content a b { - color: rgb(85, 188, 249); - } - [data-ea-publisher].loaded.dark .ea-callout a:link, - [data-ea-type].loaded.dark .ea-callout a:link { - color: rgb(189, 184, 175); - } - [data-ea-publisher].loaded.dark .ea-callout a:visited, - [data-ea-type].loaded.dark .ea-callout a:visited { - color: rgb(189, 184, 175); - } - [data-ea-publisher].loaded.dark .ea-callout a:hover, - [data-ea-type].loaded.dark .ea-callout a:hover { - color: rgb(200, 196, 189); - } - [data-ea-publisher].loaded.dark .ea-callout a:active, - [data-ea-type].loaded.dark .ea-callout a:active { - color: rgb(200, 196, 189); - } - [data-ea-publisher].loaded.dark .ea-callout a strong, - [data-ea-publisher].loaded.dark .ea-callout a b, - [data-ea-type].loaded.dark .ea-callout a strong, - [data-ea-type].loaded.dark .ea-callout a b { - color: rgb(85, 188, 249); - } - @media (prefers-color-scheme: dark) { - [data-ea-publisher].loaded.adaptive .ea-content, - [data-ea-type].loaded.adaptive .ea-content { - background-color: rgba(19, 21, 22, 0.05); - background-image: none; - color: rgb(200, 196, 189); - } - [data-ea-publisher].loaded.adaptive .ea-content a:link, - [data-ea-type].loaded.adaptive .ea-content a:link { - color: rgb(200, 196, 189); - } - [data-ea-publisher].loaded.adaptive .ea-content a:visited, - [data-ea-type].loaded.adaptive .ea-content a:visited { - color: rgb(200, 196, 189); - } - [data-ea-publisher].loaded.adaptive .ea-content a:hover, - [data-ea-type].loaded.adaptive .ea-content a:hover { - color: rgb(212, 208, 202); - } - [data-ea-publisher].loaded.adaptive .ea-content a:active, - [data-ea-type].loaded.adaptive .ea-content a:active { - color: rgb(212, 208, 202); - } - [data-ea-publisher].loaded.adaptive .ea-content a strong, - [data-ea-publisher].loaded.adaptive .ea-content a b, - [data-ea-type].loaded.adaptive .ea-content a strong, - [data-ea-type].loaded.adaptive .ea-content a b { - color: rgb(85, 188, 249); - } - [data-ea-publisher].loaded.adaptive .ea-callout a:link, - [data-ea-type].loaded.adaptive .ea-callout a:link { - color: rgb(189, 184, 175); - } - [data-ea-publisher].loaded.adaptive .ea-callout a:visited, - [data-ea-type].loaded.adaptive .ea-callout a:visited { - color: rgb(189, 184, 175); - } - [data-ea-publisher].loaded.adaptive .ea-callout a:hover, - [data-ea-type].loaded.adaptive .ea-callout a:hover { - color: rgb(200, 196, 189); - } - [data-ea-publisher].loaded.adaptive .ea-callout a:active, - [data-ea-type].loaded.adaptive .ea-callout a:active { - color: rgb(200, 196, 189); - } - [data-ea-publisher].loaded.adaptive .ea-callout a strong, - [data-ea-publisher].loaded.adaptive .ea-callout a b, - [data-ea-type].loaded.adaptive .ea-callout a strong, - [data-ea-type].loaded.adaptive .ea-callout a b { - color: rgb(85, 188, 249); - } - } - [data-ea-publisher].loaded .ea-content, - [data-ea-type].loaded .ea-content { - border-color: currentcolor; - box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 3px; - } - [data-ea-publisher].loaded.raised .ea-content, - [data-ea-type].loaded.raised .ea-content { - border-color: currentcolor; - box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 3px; - } - [data-ea-publisher].loaded.bordered .ea-content, - [data-ea-type].loaded.bordered .ea-content { - border-color: rgba(84, 91, 95, 0.04); - box-shadow: none; - } - [data-ea-publisher].loaded.bordered.dark .ea-content, - [data-ea-type].loaded.bordered.dark .ea-content { - border-color: rgba(123, 114, 101, 0.07); - } - @media (prefers-color-scheme: dark) { - [data-ea-publisher].loaded.bordered.adaptive .ea-content, - [data-ea-type].loaded.bordered.adaptive .ea-content { - border-color: rgba(123, 114, 101, 0.07); - } - } - [data-ea-publisher].loaded.flat .ea-content, - [data-ea-type].loaded.flat .ea-content { - border-color: currentcolor; - box-shadow: none; - } - .vimvixen-hint { - background-color: rgb(98, 66, 0) !important; - border-color: rgb(170, 138, 15) !important; - color: rgb(237, 221, 175) !important; - } - #edge-translate-panel-body { - color: var(--darkreader-text--darkreader-neutral-text) !important; - } - } - - /* Override Style */ - .vimvixen-hint { - background-color: #7b5300 !important; - border-color: #d8b013 !important; - color: #f3e8c8 !important; - } - ::placeholder { - opacity: 0.5 !important; - } - a[href="https://coinmarketcap.com/"] > svg[width="94"][height="16"] > path { - fill: var(--darkreader-neutral-text) !important; - } - #edge-translate-panel-body { - color: var(--darkreader-neutral-text) !important; - } - -} \ No newline at end of file diff --git a/docs/source/_static/style_external_link.css b/docs/source/_static/style_external_link.css new file mode 100644 index 000000000..4765096ed --- /dev/null +++ b/docs/source/_static/style_external_link.css @@ -0,0 +1,5 @@ +article a.reference.external:not([href*="/python-telegram-bot/blob/"])::after { + content: url('data:image/svg+xml,'); + margin: 0 0.25rem; + vertical-align: middle; +} \ No newline at end of file diff --git a/docs/source/bot_methods.rst b/docs/source/bot_methods.rst new file mode 100644 index 000000000..f3c53746c --- /dev/null +++ b/docs/source/bot_methods.rst @@ -0,0 +1,304 @@ +.. raw:: html + +
+

Since this class has a large number of methods and attributes, below you can find a quick overview. + +

+
+ Sending Messages + +.. list-table:: + :align: left + :widths: 1 4 + + * - :meth:`~telegram.Bot.send_animation` + - Used for sending animations + * - :meth:`~telegram.Bot.send_audio` + - Used for sending audio files + * - :meth:`~telegram.Bot.send_chat_action` + - Used for sending chat actions + * - :meth:`~telegram.Bot.send_contact` + - Used for sending contacts + * - :meth:`~telegram.Bot.send_dice` + - Used for sending dice messages + * - :meth:`~telegram.Bot.send_document` + - Used for sending documents + * - :meth:`~telegram.Bot.send_game` + - Used for sending a game + * - :meth:`~telegram.Bot.send_invoice` + - Used for sending an invoice + * - :meth:`~telegram.Bot.send_location` + - Used for sending location + * - :meth:`~telegram.Bot.send_media_group` + - Used for sending media grouped together + * - :meth:`~telegram.Bot.send_message` + - Used for sending text messages + * - :meth:`~telegram.Bot.send_photo` + - Used for sending photos + * - :meth:`~telegram.Bot.send_poll` + - Used for sending polls + * - :meth:`~telegram.Bot.send_sticker` + - Used for sending stickers + * - :meth:`~telegram.Bot.send_venue` + - Used for sending venue locations. + * - :meth:`~telegram.Bot.send_video` + - Used for sending videos + * - :meth:`~telegram.Bot.send_video_note` + - Used for sending video notes + * - :meth:`~telegram.Bot.send_voice` + - Used for sending voice messages + * - :meth:`~telegram.Bot.copy_message` + - Used for copying the contents of an arbitrary message + * - :meth:`~telegram.Bot.forward_message` + - Used for forwarding messages + +.. raw:: html + +
+
+ +.. raw:: html + +
+ Updating Messages + +.. list-table:: + :align: left + :widths: 1 4 + + * - :meth:`~telegram.Bot.answer_callback_query` + - Used for answering the callback query + * - :meth:`~telegram.Bot.answer_inline_query` + - Used for answering the inline query + * - :meth:`~telegram.Bot.answer_pre_checkout_query` + - Used for answering a pre checkout query + * - :meth:`~telegram.Bot.answer_shipping_query` + - Used for answering a shipping query + * - :meth:`~telegram.Bot.edit_message_caption` + - Used for editing captions + * - :meth:`~telegram.Bot.edit_message_media` + - Used for editing the media on messages + * - :meth:`~telegram.Bot.edit_message_live_location` + - Used for editing the location in live location messages + * - :meth:`~telegram.Bot.edit_message_reply_markup` + - Used for editing the reply markup on messages + * - :meth:`~telegram.Bot.edit_message_text` + - Used for editing text messages + * - :meth:`~telegram.Bot.stop_poll` + - Used for stopping the running poll + * - :meth:`~telegram.Bot.delete_message` + - Used for deleting messages. + +.. raw:: html + +
+
+ +.. raw:: html + +
+ Chat Moderation and information + +.. list-table:: + :align: left + :widths: 1 4 + + * - :meth:`~telegram.Bot.ban_chat_member` + - Used for banning a member from the chat + * - :meth:`~telegram.Bot.unban_chat_member` + - Used for unbanning a member from the chat + * - :meth:`~telegram.Bot.ban_chat_sender_chat` + - Used for banning a channel in a channel or supergroup + * - :meth:`~telegram.Bot.unban_chat_sender_chat` + - Used for unbanning a channel in a channel or supergroup + * - :meth:`~telegram.Bot.restrict_chat_member` + - Used for restricting a chat member + * - :meth:`~telegram.Bot.promote_chat_member` + - Used for promoting a chat member + * - :meth:`~telegram.Bot.set_chat_administrator_custom_title` + - Used for assigning a custom admin title to an admin + * - :meth:`~telegram.Bot.set_chat_permissions` + - Used for setting the permissions of a chat + * - :meth:`~telegram.Bot.export_chat_invite_link` + - Used for creating a new primary invite link for a chat + * - :meth:`~telegram.Bot.create_chat_invite_link` + - Used for creating an additional invite link for a chat + * - :meth:`~telegram.Bot.edit_chat_invite_link` + - Used for editing a non-primary invite link + * - :meth:`~telegram.Bot.revoke_chat_invite_link` + - Used for revoking an invite link created by the bot + * - :meth:`~telegram.Bot.approve_chat_join_request` + - Used for approving a chat join request + * - :meth:`~telegram.Bot.decline_chat_join_request` + - Used for declining a chat join request + * - :meth:`~telegram.Bot.set_chat_photo` + - Used for setting a photo to a chat + * - :meth:`~telegram.Bot.delete_chat_photo` + - Used for deleting a chat photo + * - :meth:`~telegram.Bot.set_chat_title` + - Used for setting a chat title + * - :meth:`~telegram.Bot.set_chat_description` + - Used for setting the description of a chat + * - :meth:`~telegram.Bot.pin_chat_message` + - Used for pinning a message + * - :meth:`~telegram.Bot.unpin_chat_message` + - Used for unpinning a message + * - :meth:`~telegram.Bot.unpin_all_chat_messages` + - Used for unpinning all pinned chat messages + * - :meth:`~telegram.Bot.get_user_profile_photos` + - Used for obtaining user's profile pictures + * - :meth:`~telegram.Bot.get_chat` + - Used for getting information about a chat + * - :meth:`~telegram.Bot.get_chat_administrators` + - Used for getting the list of admins in a chat + * - :meth:`~telegram.Bot.get_chat_member_count` + - Used for getting the number of members in a chat + * - :meth:`~telegram.Bot.get_chat_member` + - Used for getting a member of a chat + * - :meth:`~telegram.Bot.set_my_commands` + - Used for setting the list of commands + * - :meth:`~telegram.Bot.delete_my_commands` + - Used for deleting the list of commands + * - :meth:`~telegram.Bot.get_my_commands` + - Used for obtaining the list of commands + * - :meth:`~telegram.Bot.leave_chat` + - Used for leaving a chat + +.. raw:: html + +
+
+ +.. raw:: html + +
+ Stickerset management + +.. list-table:: + :align: left + :widths: 1 4 + + * - :meth:`~telegram.Bot.add_sticker_to_set` + - Used for adding a sticker to a set + * - :meth:`~telegram.Bot.delete_sticker_from_set` + - Used for deleting a sticker from a set + * - :meth:`~telegram.Bot.create_new_sticker_set` + - Used for creating a new sticker set + * - :meth:`~telegram.Bot.set_chat_sticker_set` + - Used for setting a sticker set + * - :meth:`~telegram.Bot.delete_chat_sticker_set` + - Used for deleting the set sticker set + * - :meth:`~telegram.Bot.set_sticker_position_in_set` + - Used for moving a sticker's position in the set + * - :meth:`~telegram.Bot.set_sticker_set_thumb` + - Used for setting the thumbnail of a sticker set + * - :meth:`~telegram.Bot.get_sticker_set` + - Used for getting a sticker set + * - :meth:`~telegram.Bot.upload_sticker_file` + - Used for uploading a sticker file + +.. raw:: html + +
+
+ +.. raw:: html + +
+ Games + +.. list-table:: + :align: left + :widths: 1 4 + + * - :meth:`~telegram.Bot.get_game_high_scores` + - Used for getting the game high scores + * - :meth:`~telegram.Bot.set_game_score` + - Used for setting the game score + +.. raw:: html + +
+
+ +.. raw:: html + +
+ Getting updates + +.. list-table:: + :align: left + :widths: 1 4 + + * - :meth:`~telegram.Bot.get_updates` + - Used for getting updates using long polling + * - :meth:`~telegram.Bot.get_webhook_info` + - Used for getting current webhook status + * - :meth:`~telegram.Bot.set_webhook` + - Used for setting a webhook to receive updates + * - :meth:`~telegram.Bot.delete_webhook` + - Used for removing webhook integration + +.. raw:: html + +
+
+ +.. raw:: html + +
+ Miscellaneous + +.. list-table:: + :align: left + :widths: 1 4 + + * - :meth:`~telegram.Bot.close` + - Used for closing server instance when switching to another local server + * - :meth:`~telegram.Bot.log_out` + - Used for logging out from cloud Bot API server + * - :meth:`~telegram.Bot.get_file` + - Used for getting basic info about a file + * - :meth:`~telegram.Bot.get_me` + - Used for getting basic information about the bot + +.. raw:: html + +
+
+ +.. raw:: html + +
+ Properties + +.. list-table:: + :align: left + :widths: 1 4 + + * - :attr:`~telegram.Bot.bot` + - The user instance of the bot as returned by :meth:`~telegram.Bot.get_me` + * - :attr:`~telegram.Bot.can_join_groups` + - Whether the bot can join groups + * - :attr:`~telegram.Bot.can_read_all_group_messages` + - Whether the bot can read all incoming group messages + * - :attr:`~telegram.Bot.id` + - The user id of the bot + * - :attr:`~telegram.Bot.name` + - The username of the bot, with leading ``@`` + * - :attr:`~telegram.Bot.first_name` + - The first name of the bot + * - :attr:`~telegram.Bot.last_name` + - The last name of the bot + * - :attr:`~telegram.Bot.username` + - The username of the bot, without leading ``@`` + * - :attr:`~telegram.Bot.link` + - The t.me link of the bot + * - :attr:`~telegram.Bot.supports_inline_queries` + - Whether the bot supports inline queries + +.. raw:: html + +
+
+
diff --git a/docs/source/conf.py b/docs/source/conf.py index e96519011..1a5ff48f1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,15 +11,18 @@ # # All configuration values have a default; values that are commented out # serve to show the default. +import subprocess +import re import sys import os +import inspect from enum import Enum +from pathlib import Path from typing import Tuple # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -import inspect from docutils.nodes import Element from sphinx.application import Sphinx from sphinx.domains.python import PyXRefRole @@ -31,7 +34,7 @@ sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = '4.2.0' +needs_sphinx = '4.3.2' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -39,7 +42,9 @@ needs_sphinx = '4.2.0' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', - 'sphinx.ext.intersphinx' + 'sphinx.ext.intersphinx', + 'sphinx.ext.linkcode', + 'sphinx_paramlinks', ] # Use intersphinx to reference the python builtin library docs @@ -55,6 +60,13 @@ autodoc_typehints = 'none' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] +# Fail on warnings & unresolved references etc +nitpicky = True + +# Paramlink style +paramlinks_hyperlink_param = 'name' + + # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # source_suffix = ['.rst', '.md'] @@ -129,13 +141,21 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'sphinx_rtd_theme' +html_theme = 'furo' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. html_theme_options = { - 'style_external_links': True, + 'navigation_with_keys': True, + 'dark_css_variables': {'admonition-title-font-size': '0.95rem', + 'admonition-font-size': '0.92rem'}, + 'light_css_variables': {'admonition-title-font-size': '0.95rem', + 'admonition-font-size': '0.92rem'}, + "announcement": 'PTB has undergone significant changes in v14. Please read the documentation ' + 'carefully and also check out the transition guide in the ' + '' + 'wiki', } # Add any paths that contain custom themes here, relative to this directory. @@ -143,25 +163,27 @@ html_theme_options = { # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = f"python-telegram-bot
v{version}" # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -html_logo = 'ptb-logo-orange.png' +html_logo = 'ptb-logo_1024.png' # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -html_favicon = 'ptb-logo-orange.ico' +html_favicon = 'ptb-logo_1024.ico' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +html_css_files = ['style_external_link.css'] + # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. @@ -386,7 +408,141 @@ def autodoc_skip_member(app, what, name, obj, skip, options): return True # return True to exclude from docs. +# ------------------------------------------------------------------------------------------------ +# This part is for getting the [source] links on the classes, methods etc link to the correct +# files & lines on github. Can be simplified once https://github.com/sphinx-doc/sphinx/issues/1556 +# is closed + +line_numbers = {} +file_root = Path(inspect.getsourcefile(telegram)).parent.parent.resolve() +import telegram.ext # Needed for checking if an object is a BaseFilter + + +def autodoc_process_docstring(app: Sphinx, what, name: str, obj: object, options, lines): + """We misuse this autodoc hook to get the file names & line numbers because we have access + to the actual object here. + """ + # Ce can't properly handle ordinary attributes. + # In linkcode_resolve we'll resolve to the `__init__` or module instead + if what == 'attribute': + return + + # Special casing for properties + if hasattr(obj, 'fget'): + obj = obj.fget + + # Special casing for filters + if isinstance(obj, telegram.ext.filters.BaseFilter): + obj = obj.__class__ + + try: + source_lines, start_line = inspect.getsourcelines(obj) + end_line = start_line + len(source_lines) + file = Path(inspect.getsourcefile(obj)).relative_to(file_root) + line_numbers[name] = (file, start_line, end_line) + except Exception: + pass + + # Since we don't document the `__init__`, we call this manually to have it available for + # attributes -- see the note above + if what == 'class': + autodoc_process_docstring(app, 'method', f'{name}.__init__', obj.__init__, options, lines) + + +def _git_branch() -> str: + """Get's the current git sha if available or fall back to `master`""" + try: + output = subprocess.check_output( # skipcq: BAN-B607 + ["git", "describe", "--tags"], stderr=subprocess.STDOUT + ) + return output.decode().strip() + except Exception: + return 'master' + + +git_branch = _git_branch() +base_url = "https://github.com/python-telegram-bot/python-telegram-bot/blob/" + + +def linkcode_resolve(_, info): + """See www.sphinx-doc.org/en/master/usage/extensions/linkcode.html""" + combined = '.'.join((info['module'], info['fullname'])) + # special casing for ExtBot which is due to the special structure of extbot.rst + combined = combined.replace('ExtBot.ExtBot', 'ExtBot') + + line_info = line_numbers.get(combined) + + if not line_info: + # Try the __init__ + line_info = line_numbers.get(f"{combined.rsplit('.', 1)[0]}.__init__") + if not line_info: + # Try the class + line_info = line_numbers.get(f"{combined.rsplit('.', 1)[0]}") + if not line_info: + # Try the module + line_info = line_numbers.get(info['module']) + + if not line_info: + return + + file, start_line, end_line = line_info + return f"{base_url}{git_branch}/{file}#L{start_line}-L{end_line}" + +# End of logic for the [source] links +# ------------------------------------------------------------------------------------------------ + + +# Some base classes are implementation detail +# We want to instead show *their* base class +PRIVATE_BASE_CLASSES = { + '_ChatUserBaseFilter': 'MessageFilter', + '_Dice': 'MessageFilter', + '_BaseThumbedMedium': 'TelegramObject', + '_BaseMedium': 'TelegramObject', + '_CredentialsBase': 'TelegramObject', +} + + +def autodoc_process_bases(app, name, obj, option, bases: list): + """Here we fine tune how the base class's classes are displayed.""" + for idx, base in enumerate(bases): + # let's use a string representation of the object + base = str(base) + + # Special case because base classes are in std lib: + if "_StringEnum" in base: + bases[idx] = ":class:`enum.Enum`" + bases.insert(0, ':class:`str`') + continue + + # Drop generics (at least for now) + if base.endswith("]"): + base = base.split("[", maxsplit=1)[0] + bases[idx] = f':class:`{base}`' + + # Now convert `telegram._message.Message` to `telegram.Message` etc + match = re.search(pattern=r"(telegram(\.ext|))\.", string=base) + if match and '_utils' not in base: + base = base.rstrip("'>") + parts = base.rsplit(".", maxsplit=2) + + # Replace private base classes with their respective parent + parts[-1] = PRIVATE_BASE_CLASSES.get(parts[-1], parts[-1]) + + # To make sure that e.g. `telegram.ext.filters.BaseFilter` keeps the `filters` part + if not parts[-2].startswith('_') and '_' not in parts[0]: + base = '.'.join(parts[-2:]) + else: + base = parts[-1] + + # add `telegram(.ext).` back in front + base = f'{match.group(0)}{base}' + + bases[idx] = f':class:`{base}`' + + def setup(app: Sphinx): - app.add_css_file("dark.css") app.connect('autodoc-skip-member', autodoc_skip_member) + app.connect('autodoc-process-bases', autodoc_process_bases) + app.connect('autodoc-process-docstring', autodoc_process_docstring) app.add_role_to_domain('py', CONSTANTS_ROLE, TGConstXRefRole()) diff --git a/docs/source/ptb-logo_1024.ico b/docs/source/ptb-logo_1024.ico new file mode 100644 index 0000000000000000000000000000000000000000..bcda105fb0405fc88a2a9ec18b36bd1687660d24 GIT binary patch literal 1150 zcmb7@Sxi$|7{`y!B*u9`AI9k0JWL|@#lZ(+6dN}nW>#<+x1cpTfpKDt7-hh!wCKPP zCNwIjM63&7ZOdY5Q&gb0s~{>}=w_vKvCC;GWvLbc`^_oDR_ASU^PPLncfQ|0|8wtm z5L!f@Wy=s5zd=P`BD4Y_lum-ANM<2VUI>vrNA5z*uRj?80F^Vy-V50pT~|YqP20vG zxy2+FnN_V>1D*9nw!Y4c1QL(OKOq;Uv(s-8sa>kzot6q%InZ^rP#^YKSBAZ>R)}kl z4DwDfKvsWTMryvAiA6u-$Glb)@mkY#(koTcnth{9r`AC$=clOh?pcAHS1M>O%Z*+y zS_Ay@ys%bSQyFqw(n4-?Qp0b1iu_hh`eSYZ7L;xTen}Px&t*eP2?Io&pP{><7;c?d z2RDBI4*2Z+fYYEzcNtYF-l{=9vx<7mJ%B}J3=sU81^o}$V0d&5@bF6*4>;gHYdbU? z%OD~p~2v64?!jg&{=;rQ+!Hz2M4fVhjw!>U30v7rn+&P&EZI^apmqAXs|HEUOno`s= zv4pb~#1}S0JBtAi**PG;UI-RB56nG{(0nEfIx2S&o~GPG%B26WQ-{JMFIPY3mpX_> zl&)h=^Raq$!Un#ZTeaXfj~`)=oFRFm_hE z4dTCDdU3V$xsVf(T>2s2#@aNm!7teWlIlI!V^mOYOsW4DdfkUYb}jYv=FuR{-8rMW z#vJRa+#Z*5wt<+v6*?|#frLh)H>5Rtv1f?z<`f@x44~2B{`6kh=|%fHU{ z*6yC|;qG}ydLyX0U97Yzn}1AzALeF~d}2cG)qKPz0?UI|MW*{%>kfyyi8-ulVvh6) f^L!?G=G%yW`Nz7C@OT". is case insensitive. 1-64 characters. title (:obj:`str`): Sticker set title, 1-64 characters. - png_sticker (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path`, \ + png_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \ optional): **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to @@ -4747,7 +4760,7 @@ class Bot(TelegramObject): .. versionchanged:: 13.2 Accept :obj:`bytes` as input. - tgs_sticker (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path`, \ + tgs_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \ optional): **TGS** animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements. @@ -4831,7 +4844,7 @@ class Bot(TelegramObject): user_id (:obj:`int`): User identifier of created sticker set owner. name (:obj:`str`): Sticker set name. - png_sticker (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path`, \ + png_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \ optional): **PNG** image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. Pass a file_id as a String to @@ -4841,7 +4854,7 @@ class Bot(TelegramObject): .. versionchanged:: 13.2 Accept :obj:`bytes` as input. - tgs_sticker (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path`, \ + tgs_sticker (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \ optional): **TGS** animation with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#animated-sticker-requirements for technical requirements. @@ -4970,7 +4983,7 @@ class Bot(TelegramObject): Args: name (:obj:`str`): Sticker set name user_id (:obj:`int`): User identifier of created sticker set owner. - thumb (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path`, \ + thumb (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \ optional): A **PNG** image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a **TGS** animation with the thumbnail up to 32 kilobytes in size; see @@ -5099,13 +5112,13 @@ class Bot(TelegramObject): available modes. explanation_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in message text, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. open_period (:obj:`int`, optional): Amount of time in seconds the poll will be active - after creation, 5-600. Can't be used together with :attr:`close_date`. + after creation, 5-600. Can't be used together with :paramref:`close_date`. close_date (:obj:`int` | :obj:`datetime.datetime`, optional): Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with - :attr:`open_period`. + :paramref:`open_period`. For timezone naive :obj:`datetime.datetime` objects, the default timezone of the bot will be used. is_closed (:obj:`bool`, optional): Pass :obj:`True`, if the poll needs to be diff --git a/telegram/_callbackquery.py b/telegram/_callbackquery.py index 60abd5b7a..6f65589cb 100644 --- a/telegram/_callbackquery.py +++ b/telegram/_callbackquery.py @@ -47,13 +47,14 @@ class CallbackQuery(TelegramObject): considered equal, if their :attr:`id` is equal. Note: - * In Python :keyword:`from` is a reserved word, use ``from_user`` instead. + * In Python :keyword:`from` is a reserved word, :paramref:`from_user` * Exactly one of the fields :attr:`data` or :attr:`game_short_name` will be present. * After the user presses an inline button, Telegram clients will display a progress bar until you call :attr:`answer`. It is, therefore, necessary to react by calling :attr:`telegram.Bot.answer_callback_query` even if no notification to the user is needed (e.g., without specifying any of the optional parameters). - * If you're using :attr:`Bot.arbitrary_callback_data`, :attr:`data` may be an instance + * If you're using :attr:`telegram.ext.ExtBot.arbitrary_callback_data`, :attr:`data` may be + an instance of :class:`telegram.ext.InvalidCallbackData`. This will be the case, if the data associated with the button triggering the :class:`telegram.CallbackQuery` was already deleted or if :attr:`data` was manipulated by a malicious client. @@ -520,7 +521,8 @@ class CallbackQuery(TelegramObject): *args, **kwargs) For the documentation of the arguments, please see - :meth:`telegram.Bot.get_game_high_scores` and :meth:`telegram.Message.get_game_high_score`. + :meth:`telegram.Bot.get_game_high_scores` and + :meth:`telegram.Message.get_game_high_scores`. Returns: List[:class:`telegram.GameHighScore`] diff --git a/telegram/_chat.py b/telegram/_chat.py index 8eda5ec35..aa2b44418 100644 --- a/telegram/_chat.py +++ b/telegram/_chat.py @@ -1110,12 +1110,12 @@ class Chat(TelegramObject): For the documentation of the arguments, please see :meth:`telegram.Bot.send_invoice`. Warning: - As of API 5.2 :attr:`start_parameter` is an optional argument and therefore the order - of the arguments had to be changed. Use keyword arguments to make sure that the + As of API 5.2 :paramref:`start_parameter` is an optional argument and therefore the + order of the arguments had to be changed. Use keyword arguments to make sure that the arguments are passed correctly. .. versionchanged:: 13.5 - As of Bot API 5.2, the parameter :attr:`start_parameter` is optional. + As of Bot API 5.2, the parameter :paramref:`start_parameter` is optional. Returns: :class:`telegram.Message`: On success, instance representing the message posted. diff --git a/telegram/_chatmemberupdated.py b/telegram/_chatmemberupdated.py index 32f5fe112..1944f4527 100644 --- a/telegram/_chatmemberupdated.py +++ b/telegram/_chatmemberupdated.py @@ -38,7 +38,7 @@ class ChatMemberUpdated(TelegramObject): .. versionadded:: 13.4 Note: - In Python :keyword:`from` is a reserved word, use ``from_user`` instead. + In Python :keyword:`from` is a reserved word, :paramref:`from_user` Args: chat (:class:`telegram.Chat`): Chat the user belongs to. @@ -148,8 +148,8 @@ class ChatMemberUpdated(TelegramObject): .. versionadded:: 13.5 Returns: - Dict[:obj:`str`, Tuple[:obj:`obj`, :obj:`obj`]]: A dictionary mapping attribute names - to tuples of the form ``(old_value, new_value)`` + Dict[:obj:`str`, Tuple[:class:`object`, :class:`object`]]: A dictionary mapping + attribute names to tuples of the form ``(old_value, new_value)`` """ # we first get the names of the attributes that have changed # user.to_dict() is unhashable, so that needs some special casing further down diff --git a/telegram/_choseninlineresult.py b/telegram/_choseninlineresult.py index 9aef361a1..bc3bdf8a0 100644 --- a/telegram/_choseninlineresult.py +++ b/telegram/_choseninlineresult.py @@ -37,7 +37,7 @@ class ChosenInlineResult(TelegramObject): considered equal, if their :attr:`result_id` is equal. Note: - * In Python :keyword:`from` is a reserved word, use ``from_user`` instead. + * In Python :keyword:`from` is a reserved word, :paramref:`from_user` * It is necessary to enable inline feedback via `@Botfather `_ in order to receive these objects in updates. diff --git a/telegram/_files/file.py b/telegram/_files/file.py index c1fe7ce02..ebf553044 100644 --- a/telegram/_files/file.py +++ b/telegram/_files/file.py @@ -102,24 +102,24 @@ class File(TelegramObject): """ Download this file. By default, the file is saved in the current working directory with its original filename as reported by Telegram. If the file has no filename, it the file ID will - be used as filename. If a :attr:`custom_path` is supplied, it will be saved to that path - instead. If :attr:`out` is defined, the file contents will be saved to that object using - the ``out.write`` method. + be used as filename. If a :paramref:`custom_path` is supplied, it will be saved to that + path instead. If :paramref:`out` is defined, the file contents will be saved to that object + using the ``out.write`` method. Note: - * :attr:`custom_path` and :attr:`out` are mutually exclusive. - * If neither :attr:`custom_path` nor :attr:`out` is provided and :attr:`file_path` is - the path of a local file (which is the case when a Bot API Server is running in - local mode), this method will just return the path. + * :paramref:`custom_path` and :paramref:`out` are mutually exclusive. + * If neither :paramref:`custom_path` nor :paramref:`out` is provided and + :attr:`file_path` is the path of a local file (which is the case when a Bot API + Server is running in local mode), this method will just return the path. .. versionchanged:: 14.0 - * ``custom_path`` parameter now also accepts :obj:`pathlib.Path` as argument. - * Returns :obj:`pathlib.Path` object in cases where previously a :obj:`str` was + * :paramref:`custom_path` parameter now also accepts :class:`pathlib.Path` as argument. + * Returns :class:`pathlib.Path` object in cases where previously a :obj:`str` was returned. Args: - custom_path (:obj:`pathlib.Path` | :obj:`str`, optional): Custom path. + custom_path (:class:`pathlib.Path` | :obj:`str`, optional): Custom path. out (:obj:`io.BufferedWriter`, optional): A file-like object. Must be opened for writing in binary mode, if applicable. timeout (:obj:`int` | :obj:`float`, optional): If this value is specified, use it as @@ -127,12 +127,12 @@ class File(TelegramObject): the connection pool). Returns: - :obj:`pathlib.Path` | :obj:`io.BufferedWriter`: The same object as :attr:`out` if + :class:`pathlib.Path` | :obj:`io.BufferedWriter`: The same object as :paramref:`out` if specified. Otherwise, returns the filename downloaded to or the file path of the local file. Raises: - ValueError: If both :attr:`custom_path` and :attr:`out` are passed. + ValueError: If both :paramref:`custom_path` and :paramref:`out` are passed. """ if custom_path is not None and out is not None: @@ -184,15 +184,15 @@ class File(TelegramObject): ) ) - def download_as_bytearray(self, buf: bytearray = None) -> bytes: + def download_as_bytearray(self, buf: bytearray = None) -> bytearray: """Download this file and return it as a bytearray. Args: buf (:obj:`bytearray`, optional): Extend the given bytearray with the downloaded data. Returns: - :obj:`bytearray`: The same object as :attr:`buf` if it was specified. Otherwise a newly - allocated :obj:`bytearray`. + :obj:`bytearray`: The same object as :paramref:`buf` if it was specified. Otherwise a + newly allocated :obj:`bytearray`. """ if buf is None: diff --git a/telegram/_files/inputfile.py b/telegram/_files/inputfile.py index cffae12c4..5ecdee048 100644 --- a/telegram/_files/inputfile.py +++ b/telegram/_files/inputfile.py @@ -34,7 +34,7 @@ class InputFile: """This object represents a Telegram InputFile. Args: - obj (:obj:`File handler` | :obj:`bytes`): An open file descriptor or the files content as + obj (:term:`file object` | :obj:`bytes`): An open file descriptor or the files content as bytes. filename (:obj:`str`, optional): Filename for this InputFile. attach (:obj:`bool`, optional): Whether this should be send as one file or is part of a diff --git a/telegram/_files/inputmedia.py b/telegram/_files/inputmedia.py index c20909b7a..de64239af 100644 --- a/telegram/_files/inputmedia.py +++ b/telegram/_files/inputmedia.py @@ -43,12 +43,12 @@ class InputMedia(TelegramObject): Base class for Telegram InputMedia Objects. .. versionchanged:: 14.0: - Added arguments and attributes :attr:`media_type`, :attr:`media`, :attr:`caption`, - :attr:`caption_entities`, :attr:`parse_mode`. + Added arguments and attributes :attr:`type`, :attr:`media`, :attr:`caption`, + :attr:`caption_entities`, :paramref:`parse_mode`. Args: media_type (:obj:`str`) Type of media that the instance represents. - media (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path` | \ + media (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | \ :class:`telegram.Animation` | :class:`telegram.Audio` | \ :class:`telegram.Document` | :class:`telegram.PhotoSize` | \ :class:`telegram.Video`): @@ -114,7 +114,7 @@ class InputMediaAnimation(InputMedia): arguments. Args: - media (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path` | \ + media (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | \ :class:`telegram.Animation`): File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet. Lastly you can pass an existing @@ -127,7 +127,7 @@ class InputMediaAnimation(InputMedia): :obj:`tempfile` module. .. versionadded:: 13.1 - thumb (`filelike object` | :obj:`bytes` | :class:`pathlib.Path`, optional): Thumbnail of + thumb (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, optional): Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should @@ -195,7 +195,7 @@ class InputMediaPhoto(InputMedia): """Represents a photo to be sent. Args: - media (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path` | \ + media (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | \ :class:`telegram.PhotoSize`): File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet. Lastly you can pass an existing @@ -253,7 +253,7 @@ class InputMediaVideo(InputMedia): by Telegram. Args: - media (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path` | \ + media (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | \ :class:`telegram.Video`): File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet. Lastly you can pass an existing @@ -279,7 +279,7 @@ class InputMediaVideo(InputMedia): duration (:obj:`int`, optional): Video duration in seconds. supports_streaming (:obj:`bool`, optional): Pass :obj:`True`, if the uploaded video is suitable for streaming. - thumb (`filelike object` | :obj:`bytes` | :class:`pathlib.Path`, optional): Thumbnail of + thumb (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, optional): Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should @@ -346,7 +346,7 @@ class InputMediaAudio(InputMedia): optional arguments. Args: - media (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path` | \ + media (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | \ :class:`telegram.Audio`): File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP @@ -372,7 +372,7 @@ class InputMediaAudio(InputMedia): performer (:obj:`str`, optional): Performer of the audio as defined by sender or by audio tags. title (:obj:`str`, optional): Title of the audio as defined by sender or by audio tags. - thumb (`filelike object` | :obj:`bytes` | :class:`pathlib.Path`, optional): Thumbnail of + thumb (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, optional): Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should @@ -430,7 +430,7 @@ class InputMediaDocument(InputMedia): """Represents a general file to be sent. Args: - media (:obj:`str` | `filelike object` | :obj:`bytes` | :class:`pathlib.Path` | \ + media (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | \ :class:`telegram.Document`): File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet. Lastly you can pass an existing @@ -451,7 +451,7 @@ class InputMediaDocument(InputMedia): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of parse_mode. - thumb (`filelike object` | :obj:`bytes` | :class:`pathlib.Path`, optional): Thumbnail of + thumb (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, optional): Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should diff --git a/telegram/_files/sticker.py b/telegram/_files/sticker.py index 60772694f..6397b0027 100644 --- a/telegram/_files/sticker.py +++ b/telegram/_files/sticker.py @@ -60,7 +60,7 @@ class Sticker(_BaseThumbedMedium): position where the mask should be placed. file_size (:obj:`int`, optional): File size in bytes. bot (:class:`telegram.Bot`, optional): The Bot to use for instance methods. - **kwargs (obj:`dict`): Arbitrary keyword arguments. + _kwargs (:obj:`dict`): Arbitrary keyword arguments. Attributes: file_id (:obj:`str`): Identifier for this file. diff --git a/telegram/_inline/inlinekeyboardbutton.py b/telegram/_inline/inlinekeyboardbutton.py index 0d7be562f..6b0886dbd 100644 --- a/telegram/_inline/inlinekeyboardbutton.py +++ b/telegram/_inline/inlinekeyboardbutton.py @@ -66,9 +66,9 @@ class InlineKeyboardButton(TelegramObject): You can now mention a user using ``tg://user?id=``. login_url (:class:`telegram.LoginUrl`, optional): An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. - callback_data (:obj:`str` | :obj:`Any`, optional): Data to be sent in a callback query to - the bot when button is pressed, UTF-8 1-64 bytes. If the bot instance allows arbitrary - callback data, anything can be passed. + callback_data (:obj:`str` | :obj:`object`, optional): Data to be sent in a callback query + to the bot when button is pressed, UTF-8 1-64 bytes. If the bot instance allows + arbitrary callback data, anything can be passed. switch_inline_query (:obj:`str`, optional): If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's @@ -170,7 +170,7 @@ class InlineKeyboardButton(TelegramObject): .. versionadded:: 13.6 Args: - callback_data (:obj:`obj`): The new callback data. + callback_data (:class:`object`): The new callback data. """ self.callback_data = callback_data self._set_id_attrs() diff --git a/telegram/_inline/inlinequery.py b/telegram/_inline/inlinequery.py index 970893037..c84f1a15d 100644 --- a/telegram/_inline/inlinequery.py +++ b/telegram/_inline/inlinequery.py @@ -38,7 +38,7 @@ class InlineQuery(TelegramObject): considered equal, if their :attr:`id` is equal. Note: - In Python :keyword:`from` is a reserved word, use ``from_user`` instead. + In Python :keyword:`from` is a reserved word, :paramref:`from_user` Args: id (:obj:`str`): Unique identifier for this query. @@ -142,11 +142,13 @@ class InlineQuery(TelegramObject): Args: auto_pagination (:obj:`bool`, optional): If set to :obj:`True`, :attr:`offset` will be - passed as :attr:`current_offset` to :meth:`telegram.Bot.answer_inline_query`. + passed as :paramref:`current_offset` to :meth:`telegram.Bot.answer_inline_query`. Defaults to :obj:`False`. Raises: - ValueError: If both :attr:`current_offset` and :attr:`auto_pagination` are supplied. + ValueError: If both + :paramref:`~telegram.Bot.answer_inline_query.current_offset` and + :paramref:`auto_pagination` are supplied. """ if current_offset and auto_pagination: raise ValueError('current_offset and auto_pagination are mutually exclusive!') diff --git a/telegram/_inline/inlinequeryresultaudio.py b/telegram/_inline/inlinequeryresultaudio.py index 3ae57f779..2a102c709 100644 --- a/telegram/_inline/inlinequeryresultaudio.py +++ b/telegram/_inline/inlinequeryresultaudio.py @@ -49,7 +49,7 @@ class InlineQueryResultAudio(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -71,7 +71,7 @@ class InlineQueryResultAudio(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultcachedaudio.py b/telegram/_inline/inlinequeryresultcachedaudio.py index f21c520b5..f87d275d9 100644 --- a/telegram/_inline/inlinequeryresultcachedaudio.py +++ b/telegram/_inline/inlinequeryresultcachedaudio.py @@ -46,7 +46,7 @@ class InlineQueryResultCachedAudio(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -65,7 +65,7 @@ class InlineQueryResultCachedAudio(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultcacheddocument.py b/telegram/_inline/inlinequeryresultcacheddocument.py index e2c2d3d80..ccc920d2f 100644 --- a/telegram/_inline/inlinequeryresultcacheddocument.py +++ b/telegram/_inline/inlinequeryresultcacheddocument.py @@ -49,7 +49,7 @@ class InlineQueryResultCachedDocument(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -70,7 +70,7 @@ class InlineQueryResultCachedDocument(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultcachedgif.py b/telegram/_inline/inlinequeryresultcachedgif.py index 2e6f373ba..f6ff42b97 100644 --- a/telegram/_inline/inlinequeryresultcachedgif.py +++ b/telegram/_inline/inlinequeryresultcachedgif.py @@ -48,7 +48,7 @@ class InlineQueryResultCachedGif(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -68,7 +68,7 @@ class InlineQueryResultCachedGif(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultcachedmpeg4gif.py b/telegram/_inline/inlinequeryresultcachedmpeg4gif.py index 1425e2478..360e54aed 100644 --- a/telegram/_inline/inlinequeryresultcachedmpeg4gif.py +++ b/telegram/_inline/inlinequeryresultcachedmpeg4gif.py @@ -48,7 +48,7 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -68,7 +68,7 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultcachedphoto.py b/telegram/_inline/inlinequeryresultcachedphoto.py index e5dcb0352..852fab799 100644 --- a/telegram/_inline/inlinequeryresultcachedphoto.py +++ b/telegram/_inline/inlinequeryresultcachedphoto.py @@ -50,7 +50,7 @@ class InlineQueryResultCachedPhoto(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -71,7 +71,7 @@ class InlineQueryResultCachedPhoto(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultcachedvideo.py b/telegram/_inline/inlinequeryresultcachedvideo.py index 5f96f5e1c..ca65ff337 100644 --- a/telegram/_inline/inlinequeryresultcachedvideo.py +++ b/telegram/_inline/inlinequeryresultcachedvideo.py @@ -49,7 +49,7 @@ class InlineQueryResultCachedVideo(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -70,7 +70,7 @@ class InlineQueryResultCachedVideo(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultcachedvoice.py b/telegram/_inline/inlinequeryresultcachedvoice.py index 7bfaae65d..2a2f2f8cd 100644 --- a/telegram/_inline/inlinequeryresultcachedvoice.py +++ b/telegram/_inline/inlinequeryresultcachedvoice.py @@ -47,7 +47,7 @@ class InlineQueryResultCachedVoice(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -67,7 +67,7 @@ class InlineQueryResultCachedVoice(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultdocument.py b/telegram/_inline/inlinequeryresultdocument.py index 254da76d6..c1164f997 100644 --- a/telegram/_inline/inlinequeryresultdocument.py +++ b/telegram/_inline/inlinequeryresultdocument.py @@ -47,7 +47,7 @@ class InlineQueryResultDocument(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. document_url (:obj:`str`): A valid URL for the file. mime_type (:obj:`str`): Mime type of the content of the file, either "application/pdf" or "application/zip". @@ -73,7 +73,7 @@ class InlineQueryResultDocument(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. document_url (:obj:`str`): A valid URL for the file. mime_type (:obj:`str`): Mime type of the content of the file, either "application/pdf" or "application/zip". diff --git a/telegram/_inline/inlinequeryresultgif.py b/telegram/_inline/inlinequeryresultgif.py index 0868e4747..7d1849ee5 100644 --- a/telegram/_inline/inlinequeryresultgif.py +++ b/telegram/_inline/inlinequeryresultgif.py @@ -55,7 +55,7 @@ class InlineQueryResultGif(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -81,7 +81,7 @@ class InlineQueryResultGif(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultmpeg4gif.py b/telegram/_inline/inlinequeryresultmpeg4gif.py index 54febebcd..8105e9808 100644 --- a/telegram/_inline/inlinequeryresultmpeg4gif.py +++ b/telegram/_inline/inlinequeryresultmpeg4gif.py @@ -54,7 +54,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -80,7 +80,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultphoto.py b/telegram/_inline/inlinequeryresultphoto.py index d2b095143..1487122fa 100644 --- a/telegram/_inline/inlinequeryresultphoto.py +++ b/telegram/_inline/inlinequeryresultphoto.py @@ -52,7 +52,7 @@ class InlineQueryResultPhoto(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`, optional): Content of the @@ -77,7 +77,7 @@ class InlineQueryResultPhoto(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. input_message_content (:class:`telegram.InputMessageContent`): Optional. Content of the diff --git a/telegram/_inline/inlinequeryresultvideo.py b/telegram/_inline/inlinequeryresultvideo.py index 1d6852cdc..edc71a3b0 100644 --- a/telegram/_inline/inlinequeryresultvideo.py +++ b/telegram/_inline/inlinequeryresultvideo.py @@ -54,7 +54,7 @@ class InlineQueryResultVideo(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. video_width (:obj:`int`, optional): Video width. video_height (:obj:`int`, optional): Video height. video_duration (:obj:`int`, optional): Video duration in seconds. @@ -82,7 +82,7 @@ class InlineQueryResultVideo(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. video_width (:obj:`int`): Optional. Video width. video_height (:obj:`int`): Optional. Video height. video_duration (:obj:`int`): Optional. Video duration in seconds. diff --git a/telegram/_inline/inlinequeryresultvoice.py b/telegram/_inline/inlinequeryresultvoice.py index bf3824551..3caec7385 100644 --- a/telegram/_inline/inlinequeryresultvoice.py +++ b/telegram/_inline/inlinequeryresultvoice.py @@ -48,7 +48,7 @@ class InlineQueryResultVoice(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. voice_duration (:obj:`int`, optional): Recording duration in seconds. reply_markup (:class:`telegram.InlineKeyboardMarkup`, optional): Inline keyboard attached to the message. @@ -69,7 +69,7 @@ class InlineQueryResultVoice(InlineQueryResult): in :class:`telegram.constants.ParseMode` for the available modes. caption_entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. voice_duration (:obj:`int`): Optional. Recording duration in seconds. reply_markup (:class:`telegram.InlineKeyboardMarkup`): Optional. Inline keyboard attached to the message. diff --git a/telegram/_inline/inputtextmessagecontent.py b/telegram/_inline/inputtextmessagecontent.py index f378d8fc2..23a038c9b 100644 --- a/telegram/_inline/inputtextmessagecontent.py +++ b/telegram/_inline/inputtextmessagecontent.py @@ -41,7 +41,7 @@ class InputTextMessageContent(InputMessageContent): in :class:`telegram.constants.ParseMode` for the available modes. entities (List[:class:`telegram.MessageEntity`], optional): List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. disable_web_page_preview (:obj:`bool`, optional): Disables link previews for links in the sent message. **kwargs (:obj:`dict`): Arbitrary keyword arguments. @@ -55,7 +55,7 @@ class InputTextMessageContent(InputMessageContent): in :class:`telegram.constants.ParseMode` for the available modes. entities (List[:class:`telegram.MessageEntity`]): Optional. List of special entities that appear in the caption, which can be specified instead of - :attr:`parse_mode`. + :paramref:`parse_mode`. disable_web_page_preview (:obj:`bool`): Optional. Disables link previews for links in the sent message. diff --git a/telegram/_message.py b/telegram/_message.py index 48de2493f..ff90df8d6 100644 --- a/telegram/_message.py +++ b/telegram/_message.py @@ -81,7 +81,7 @@ class Message(TelegramObject): considered equal, if their :attr:`message_id` and :attr:`chat` are equal. Note: - In Python :keyword:`from` is a reserved word, use ``from_user`` instead. + In Python :keyword:`from` is a reserved word, :paramref:`from_user` Args: message_id (:obj:`int`): Unique message identifier inside this chat. @@ -305,7 +305,7 @@ class Message(TelegramObject): the specified identifier. migrate_from_chat_id (:obj:`int`): Optional. The supergroup has been migrated from a group with the specified identifier. - pinned_message (:class:`telegram.message`): Optional. Specified message was pinned. + pinned_message (:class:`telegram.Message`): Optional. Specified message was pinned. invoice (:class:`telegram.Invoice`): Optional. Information about the invoice. successful_payment (:class:`telegram.SuccessfulPayment`): Optional. Information about the payment. @@ -1761,14 +1761,14 @@ class Message(TelegramObject): For the documentation of the arguments, please see :meth:`telegram.Bot.send_invoice`. Warning: - As of API 5.2 :attr:`start_parameter` is an optional argument and therefore the order - of the arguments had to be changed. Use keyword arguments to make sure that the + As of API 5.2 :paramref:`start_parameter` is an optional argument and therefore the + order of the arguments had to be changed. Use keyword arguments to make sure that the arguments are passed correctly. .. versionadded:: 13.2 .. versionchanged:: 13.5 - As of Bot API 5.2, the parameter :attr:`start_parameter` is optional. + As of Bot API 5.2, the parameter :paramref:`start_parameter` is optional. Args: quote (:obj:`bool`, optional): If set to :obj:`True`, the invoice is sent as an actual diff --git a/telegram/_passport/credentials.py b/telegram/_passport/credentials.py index ef2f9e216..478f3f9a5 100644 --- a/telegram/_passport/credentials.py +++ b/telegram/_passport/credentials.py @@ -159,7 +159,7 @@ class EncryptedCredentials(TelegramObject): :obj:`str`: Lazily decrypt and return secret. Raises: - telegram.PassportDecryptionError: Decryption failed. Usually due to bad + telegram.error.PassportDecryptionError: Decryption failed. Usually due to bad private/public key but can also suggest malformed/tampered data. """ if self._decrypted_secret is None: @@ -192,7 +192,7 @@ class EncryptedCredentials(TelegramObject): `decrypted_data.nonce`. Raises: - telegram.PassportDecryptionError: Decryption failed. Usually due to bad + telegram.error.PassportDecryptionError: Decryption failed. Usually due to bad private/public key but can also suggest malformed/tampered data. """ if self._decrypted_data is None: diff --git a/telegram/_passport/encryptedpassportelement.py b/telegram/_passport/encryptedpassportelement.py index b294adb08..e8bab3a86 100644 --- a/telegram/_passport/encryptedpassportelement.py +++ b/telegram/_passport/encryptedpassportelement.py @@ -54,7 +54,7 @@ class EncryptedPassportElement(TelegramObject): "email". hash (:obj:`str`): Base64-encoded element hash for using in :class:`telegram.PassportElementErrorUnspecified`. - data (:class:`telegram.PersonalDetails` | :class:`telegram.IdDocument` | \ + data (:class:`telegram.PersonalDetails` | :class:`telegram.IdDocumentData` | \ :class:`telegram.ResidentialAddress` | :obj:`str`, optional): Decrypted or encrypted data, available for "personal_details", "passport", "driver_license", "identity_card", "identity_passport" and "address" types. @@ -89,7 +89,7 @@ class EncryptedPassportElement(TelegramObject): "email". hash (:obj:`str`): Base64-encoded element hash for using in :class:`telegram.PassportElementErrorUnspecified`. - data (:class:`telegram.PersonalDetails` | :class:`telegram.IdDocument` | \ + data (:class:`telegram.PersonalDetails` | :class:`telegram.IdDocumentData` | \ :class:`telegram.ResidentialAddress` | :obj:`str`): Optional. Decrypted or encrypted data, available for "personal_details", "passport", "driver_license", "identity_card", "identity_passport" and "address" types. diff --git a/telegram/_passport/passportdata.py b/telegram/_passport/passportdata.py index 7cfa8d911..fcdb24cd0 100644 --- a/telegram/_passport/passportdata.py +++ b/telegram/_passport/passportdata.py @@ -32,9 +32,9 @@ class PassportData(TelegramObject): Note: To be able to decrypt this object, you must pass your ``private_key`` to either - :class:`telegram.Updater` or :class:`telegram.Bot`. Decrypted data is then found in + :class:`telegram.ext.Updater` or :class:`telegram.Bot`. Decrypted data is then found in :attr:`decrypted_data` and the payload can be found in :attr:`decrypted_credentials`'s - attribute :attr:`telegram.Credentials.payload`. + attribute :attr:`telegram.Credentials.nonce`. Args: data (List[:class:`telegram.EncryptedPassportElement`]): Array with encrypted information @@ -95,7 +95,7 @@ class PassportData(TelegramObject): about documents and other Telegram Passport elements which were shared with the bot. Raises: - telegram.PassportDecryptionError: Decryption failed. Usually due to bad + telegram.error.PassportDecryptionError: Decryption failed. Usually due to bad private/public key but can also suggest malformed/tampered data. """ if self._decrypted_data is None: @@ -115,7 +115,7 @@ class PassportData(TelegramObject): `decrypted_data.payload`. Raises: - telegram.PassportDecryptionError: Decryption failed. Usually due to bad + telegram.error.PassportDecryptionError: Decryption failed. Usually due to bad private/public key but can also suggest malformed/tampered data. """ return self.credentials.decrypted_data diff --git a/telegram/_passport/passportelementerrors.py b/telegram/_passport/passportelementerrors.py index bff320fa5..d791ba2cc 100644 --- a/telegram/_passport/passportelementerrors.py +++ b/telegram/_passport/passportelementerrors.py @@ -62,8 +62,8 @@ class PassportElementErrorDataField(PassportElementError): considered resolved when the field's value changes. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`source`, :attr:`type`, :attr:`field_name`, :attr:`data_hash` - and :attr:`message` are equal. + considered equal, if their :attr:`~telegram.PassportElementError.source`, :attr:`type`, + :attr:`field_name`, :attr:`data_hash` and :attr:`message` are equal. Args: type (:obj:`str`): The section of the user's Telegram Passport which has the error, one of @@ -101,8 +101,8 @@ class PassportElementErrorFile(PassportElementError): the document scan changes. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`source`, :attr:`type`, :attr:`file_hash`, and - :attr:`message` are equal. + considered equal, if their :attr:`~telegram.PassportElementError.source`, :attr:`type`, + :attr:`file_hash`, and :attr:`message` are equal. Args: type (:obj:`str`): The section of the user's Telegram Passport which has the issue, one of @@ -137,8 +137,8 @@ class PassportElementErrorFiles(PassportElementError): files with the document scans changes. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`source`, :attr:`type`, :attr:`file_hashes`, and - :attr:`message` are equal. + considered equal, if their :attr:`~telegram.PassportElementError.source`, :attr:`type`, + :attr:`file_hashes`, and :attr:`message` are equal. Args: type (:obj:`str`): The section of the user's Telegram Passport which has the issue, one of @@ -173,8 +173,8 @@ class PassportElementErrorFrontSide(PassportElementError): the file with the front side of the document changes. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`source`, :attr:`type`, :attr:`file_hash`, and - :attr:`message` are equal. + considered equal, if their :attr:`~telegram.PassportElementError.source`, :attr:`type`, + :attr:`file_hash`, and :attr:`message` are equal. Args: type (:obj:`str`): The section of the user's Telegram Passport which has the issue, one of @@ -209,8 +209,8 @@ class PassportElementErrorReverseSide(PassportElementError): the file with the reverse side of the document changes. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`source`, :attr:`type`, :attr:`file_hash`, and - :attr:`message` are equal. + considered equal, if their :attr:`~telegram.PassportElementError.source`, :attr:`type`, + :attr:`file_hash`, and :attr:`message` are equal. Args: type (:obj:`str`): The section of the user's Telegram Passport which has the issue, one of @@ -245,8 +245,8 @@ class PassportElementErrorSelfie(PassportElementError): the file with the selfie changes. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`source`, :attr:`type`, :attr:`file_hash`, and - :attr:`message` are equal. + considered equal, if their :attr:`~telegram.PassportElementError.source`, :attr:`type`, + :attr:`file_hash`, and :attr:`message` are equal. Args: type (:obj:`str`): The section of the user's Telegram Passport which has the issue, one of @@ -279,8 +279,8 @@ class PassportElementErrorTranslationFile(PassportElementError): The error is considered resolved when the file changes. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`source`, :attr:`type`, :attr:`file_hash`, and - :attr:`message` are equal. + considered equal, if their :attr:`~telegram.PassportElementError.source`, :attr:`type`, + :attr:`file_hash`, and :attr:`message` are equal. Args: type (:obj:`str`): Type of element of the user's Telegram Passport which has the issue, @@ -317,8 +317,8 @@ class PassportElementErrorTranslationFiles(PassportElementError): resolved when a file with the document translation changes. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`source`, :attr:`type`, :attr:`file_hashes`, and - :attr:`message` are equal. + considered equal, if their :attr:`~telegram.PassportElementError.source`, :attr:`type`, + :attr:`file_hashes`, and :attr:`message` are equal. Args: type (:obj:`str`): Type of element of the user's Telegram Passport which has the issue, @@ -355,8 +355,8 @@ class PassportElementErrorUnspecified(PassportElementError): data is added. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`source`, :attr:`type`, :attr:`element_hash`, - and :attr:`message` are equal. + considered equal, if their :attr:`~telegram.PassportElementError.source`, :attr:`type`, + :attr:`element_hash`, and :attr:`message` are equal. Args: type (:obj:`str`): Type of element of the user's Telegram Passport which has the issue. diff --git a/telegram/_payment/invoice.py b/telegram/_payment/invoice.py index 3032c2c76..fb55e7c5f 100644 --- a/telegram/_payment/invoice.py +++ b/telegram/_payment/invoice.py @@ -27,7 +27,7 @@ class Invoice(TelegramObject): """This object contains basic information about an invoice. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`title`, :attr:`description`, :attr:`start_parameter`, + considered equal, if their :attr:`title`, :attr:`description`, :paramref:`start_parameter`, :attr:`currency` and :attr:`total_amount` are equal. Args: @@ -38,7 +38,7 @@ class Invoice(TelegramObject): currency (:obj:`str`): Three-letter ISO 4217 currency code. total_amount (:obj:`int`): Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass ``amount = 145``. See the - :obj:`exp` parameter in + ``exp`` parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). diff --git a/telegram/_payment/labeledprice.py b/telegram/_payment/labeledprice.py index cbba92e6c..1b703add1 100644 --- a/telegram/_payment/labeledprice.py +++ b/telegram/_payment/labeledprice.py @@ -33,7 +33,7 @@ class LabeledPrice(TelegramObject): label (:obj:`str`): Portion label. amount (:obj:`int`): Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass ``amount = 145``. - See the :obj:`exp` parameter in + See the ``exp`` parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). diff --git a/telegram/_payment/precheckoutquery.py b/telegram/_payment/precheckoutquery.py index b7497e73a..164ad7975 100644 --- a/telegram/_payment/precheckoutquery.py +++ b/telegram/_payment/precheckoutquery.py @@ -35,7 +35,7 @@ class PreCheckoutQuery(TelegramObject): considered equal, if their :attr:`id` is equal. Note: - In Python :keyword:`from` is a reserved word, use ``from_user`` instead. + In Python :keyword:`from` is a reserved word, :paramref:`from_user` Args: id (:obj:`str`): Unique query identifier. @@ -43,7 +43,7 @@ class PreCheckoutQuery(TelegramObject): currency (:obj:`str`): Three-letter ISO 4217 currency code. total_amount (:obj:`int`): Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass ``amount = 145``. - See the :obj:`exp` parameter in + See the ``exp`` parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). diff --git a/telegram/_payment/shippingaddress.py b/telegram/_payment/shippingaddress.py index b1d20615f..61561f83a 100644 --- a/telegram/_payment/shippingaddress.py +++ b/telegram/_payment/shippingaddress.py @@ -28,7 +28,7 @@ class ShippingAddress(TelegramObject): Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`country_code`, :attr:`state`, :attr:`city`, - :attr:`street_line1`, :attr:`street_line2` and :attr:`post_cod` are equal. + :attr:`street_line1`, :attr:`street_line2` and :attr:`post_code` are equal. Args: country_code (:obj:`str`): ISO 3166-1 alpha-2 country code. diff --git a/telegram/_payment/shippingquery.py b/telegram/_payment/shippingquery.py index 8f3718e50..e1f450ee8 100644 --- a/telegram/_payment/shippingquery.py +++ b/telegram/_payment/shippingquery.py @@ -35,7 +35,7 @@ class ShippingQuery(TelegramObject): considered equal, if their :attr:`id` is equal. Note: - In Python :keyword:`from` is a reserved word, use ``from_user`` instead. + In Python :keyword:`from` is a reserved word, :paramref:`from_user` Args: id (:obj:`str`): Unique query identifier. diff --git a/telegram/_payment/successfulpayment.py b/telegram/_payment/successfulpayment.py index 2ef5eca19..afe9c2502 100644 --- a/telegram/_payment/successfulpayment.py +++ b/telegram/_payment/successfulpayment.py @@ -38,7 +38,7 @@ class SuccessfulPayment(TelegramObject): currency (:obj:`str`): Three-letter ISO 4217 currency code. total_amount (:obj:`int`): Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass ``amount = 145``. - See the :obj:`exp` parameter in + See the ``exp`` parameter in `currencies.json `_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). diff --git a/telegram/_poll.py b/telegram/_poll.py index dea2b4570..da9e362ea 100644 --- a/telegram/_poll.py +++ b/telegram/_poll.py @@ -65,7 +65,7 @@ class PollAnswer(TelegramObject): This object represents an answer of a user in a non-anonymous poll. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`poll_id`, :attr:`user` and :attr:`options_ids` are equal. + considered equal, if their :attr:`poll_id`, :attr:`user` and :attr:`option_ids` are equal. Args: poll_id (:obj:`str`): Unique poll identifier. diff --git a/telegram/_user.py b/telegram/_user.py index 9a258e572..de2182f4e 100644 --- a/telegram/_user.py +++ b/telegram/_user.py @@ -701,12 +701,12 @@ class User(TelegramObject): For the documentation of the arguments, please see :meth:`telegram.Bot.send_invoice`. Warning: - As of API 5.2 :attr:`start_parameter` is an optional argument and therefore the order - of the arguments had to be changed. Use keyword arguments to make sure that the + As of API 5.2 :paramref:`start_parameter` is an optional argument and therefore the + order of the arguments had to be changed. Use keyword arguments to make sure that the arguments are passed correctly. .. versionchanged:: 13.5 - As of Bot API 5.2, the parameter :attr:`start_parameter` is optional. + As of Bot API 5.2, the parameter :paramref:`start_parameter` is optional. Returns: :class:`telegram.Message`: On success, instance representing the message posted. diff --git a/telegram/_utils/defaultvalue.py b/telegram/_utils/defaultvalue.py index d5870d487..dedfcd92c 100644 --- a/telegram/_utils/defaultvalue.py +++ b/telegram/_utils/defaultvalue.py @@ -74,10 +74,10 @@ class DefaultValue(Generic[DVType]): ``f'DefaultValue({value})'``. Args: - value (:obj:`obj`): The value of the default argument + value (:class:`object`): The value of the default argument Attributes: - value (:obj:`obj`): The value of the default argument + value (:class:`object`): The value of the default argument """ diff --git a/telegram/_utils/files.py b/telegram/_utils/files.py index 2ba5a94f1..7bdb6f5d1 100644 --- a/telegram/_utils/files.py +++ b/telegram/_utils/files.py @@ -72,7 +72,7 @@ def parse_file_input( attribute. Args: - file_input (:obj:`str` | :obj:`bytes` | `filelike object` | Telegram media object): The + file_input (:obj:`str` | :obj:`bytes` | :term:`file object` | Telegram media object): The input to parse. tg_type (:obj:`type`, optional): The Telegram media type the input can be. E.g. :class:`telegram.Animation`. diff --git a/telegram/constants.py b/telegram/constants.py index c4344f664..5a513d14b 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -122,7 +122,7 @@ class CallbackQueryLimit(IntEnum): ANSWER_CALLBACK_QUERY_TEXT_LENGTH = 200 """:obj:`int`: Maximum number of characters for the ``text`` parameter of - :meth:`Bot.answer_callback_query`.""" + :meth:`telegram.Bot.answer_callback_query`.""" class ChatAction(_StringEnum): @@ -171,23 +171,23 @@ class ChatID(IntEnum): """:obj:`int`: User ID in groups for messages sent by anonymous admins. Note: - :attr:`Message.from_user` will contain this ID for backwards compatibility only. It's - recommended to use :attr:`Message.sender_chat` instead. + :attr:`telegram.Message.from_user` will contain this ID for backwards compatibility only. + It's recommended to use :attr:`telegram.Message.sender_chat` instead. """ SERVICE_CHAT = 777000 """:obj:`int`: Telegram service chat, that also acts as sender of channel posts forwarded to discussion groups. Note: - :attr:`Message.from_user` will contain this ID for backwards compatibility only. It's - recommended to use :attr:`Message.sender_chat` instead. + :attr:`telegram.Message.from_user` will contain this ID for backwards compatibility only. + It's recommended to use :attr:`telegram.Message.sender_chat` instead. """ FAKE_CHANNEL = 136817688 """:obj:`int`: User ID in groups when message is sent on behalf of a channel. Note: - * :attr:`Message.from_user` will contain this ID for backwards compatibility only. It's - recommended to use :attr:`Message.sender_chat` instead. + * :attr:`telegram.Message.from_user` will contain this ID for backwards compatibility only. + It's recommended to use :attr:`telegram.Message.sender_chat` instead. * This value is undocumented and might be changed by Telegram. """ @@ -377,10 +377,10 @@ class InlineQueryLimit(IntEnum): RESULTS = 50 """:obj:`int`: Maximum number of results that can be passed to - :meth:`Bot.answer_inline_query`.""" + :meth:`telegram.Bot.answer_inline_query`.""" SWITCH_PM_TEXT_LENGTH = 64 """:obj:`int`: Maximum number of characters for the ``switch_pm_text`` parameter of - :meth:`Bot.answer_inline_query`.""" + :meth:`telegram.Bot.answer_inline_query`.""" class InlineQueryResultType(_StringEnum): @@ -490,39 +490,39 @@ class MessageAttachmentType(_StringEnum): # (Enums are not extendable) ANIMATION = 'animation' - """:obj:`str`: Messages with :attr:`Message.animation`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.animation`.""" AUDIO = 'audio' - """:obj:`str`: Messages with :attr:`Message.audio`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.audio`.""" CONTACT = 'contact' - """:obj:`str`: Messages with :attr:`Message.contact`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.contact`.""" DICE = 'dice' - """:obj:`str`: Messages with :attr:`Message.dice`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.dice`.""" DOCUMENT = 'document' - """:obj:`str`: Messages with :attr:`Message.document`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.document`.""" GAME = 'game' - """:obj:`str`: Messages with :attr:`Message.game`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.game`.""" INVOICE = 'invoice' - """:obj:`str`: Messages with :attr:`Message.invoice`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.invoice`.""" LOCATION = 'location' - """:obj:`str`: Messages with :attr:`Message.location`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.location`.""" PASSPORT_DATA = 'passport_data' - """:obj:`str`: Messages with :attr:`Message.passport_data`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.passport_data`.""" PHOTO = 'photo' - """:obj:`str`: Messages with :attr:`Message.photo`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.photo`.""" POLL = 'poll' - """:obj:`str`: Messages with :attr:`Message.poll`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.poll`.""" STICKER = 'sticker' - """:obj:`str`: Messages with :attr:`Message.sticker`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.sticker`.""" SUCCESSFUL_PAYMENT = 'successful_payment' - """:obj:`str`: Messages with :attr:`Message.successful_payment`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.successful_payment`.""" VIDEO = 'video' - """:obj:`str`: Messages with :attr:`Message.video`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.video`.""" VIDEO_NOTE = 'video_note' - """:obj:`str`: Messages with :attr:`Message.video_note`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.video_note`.""" VOICE = 'voice' - """:obj:`str`: Messages with :attr:`Message.voice`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.voice`.""" VENUE = 'venue' - """:obj:`str`: Messages with :attr:`Message.venue`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.venue`.""" class MessageEntityType(_StringEnum): @@ -607,76 +607,76 @@ class MessageType(_StringEnum): # -------------------------------------------------- Attachment types ANIMATION = 'animation' - """:obj:`str`: Messages with :attr:`Message.animation`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.animation`.""" AUDIO = 'audio' - """:obj:`str`: Messages with :attr:`Message.audio`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.audio`.""" CONTACT = 'contact' - """:obj:`str`: Messages with :attr:`Message.contact`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.contact`.""" DICE = 'dice' - """:obj:`str`: Messages with :attr:`Message.dice`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.dice`.""" DOCUMENT = 'document' - """:obj:`str`: Messages with :attr:`Message.document`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.document`.""" GAME = 'game' - """:obj:`str`: Messages with :attr:`Message.game`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.game`.""" INVOICE = 'invoice' - """:obj:`str`: Messages with :attr:`Message.invoice`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.invoice`.""" LOCATION = 'location' - """:obj:`str`: Messages with :attr:`Message.location`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.location`.""" PASSPORT_DATA = 'passport_data' - """:obj:`str`: Messages with :attr:`Message.passport_data`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.passport_data`.""" PHOTO = 'photo' - """:obj:`str`: Messages with :attr:`Message.photo`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.photo`.""" POLL = 'poll' - """:obj:`str`: Messages with :attr:`Message.poll`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.poll`.""" STICKER = 'sticker' - """:obj:`str`: Messages with :attr:`Message.sticker`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.sticker`.""" SUCCESSFUL_PAYMENT = 'successful_payment' - """:obj:`str`: Messages with :attr:`Message.successful_payment`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.successful_payment`.""" VIDEO = 'video' - """:obj:`str`: Messages with :attr:`Message.video`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.video`.""" VIDEO_NOTE = 'video_note' - """:obj:`str`: Messages with :attr:`Message.video_note`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.video_note`.""" VOICE = 'voice' - """:obj:`str`: Messages with :attr:`Message.voice`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.voice`.""" VENUE = 'venue' - """:obj:`str`: Messages with :attr:`Message.venue`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.venue`.""" # -------------------------------------------------- Other types TEXT = 'text' - """:obj:`str`: Messages with :attr:`Message.text`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.text`.""" NEW_CHAT_MEMBERS = 'new_chat_members' - """:obj:`str`: Messages with :attr:`Message.new_chat_members`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.new_chat_members`.""" LEFT_CHAT_MEMBER = 'left_chat_member' - """:obj:`str`: Messages with :attr:`Message.left_chat_member`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.left_chat_member`.""" NEW_CHAT_TITLE = 'new_chat_title' - """:obj:`str`: Messages with :attr:`Message.new_chat_title`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.new_chat_title`.""" NEW_CHAT_PHOTO = 'new_chat_photo' - """:obj:`str`: Messages with :attr:`Message.new_chat_photo`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.new_chat_photo`.""" DELETE_CHAT_PHOTO = 'delete_chat_photo' - """:obj:`str`: Messages with :attr:`Message.delete_chat_photo`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.delete_chat_photo`.""" GROUP_CHAT_CREATED = 'group_chat_created' - """:obj:`str`: Messages with :attr:`Message.group_chat_created`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.group_chat_created`.""" SUPERGROUP_CHAT_CREATED = 'supergroup_chat_created' - """:obj:`str`: Messages with :attr:`Message.supergroup_chat_created`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.supergroup_chat_created`.""" CHANNEL_CHAT_CREATED = 'channel_chat_created' - """:obj:`str`: Messages with :attr:`Message.channel_chat_created`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.channel_chat_created`.""" MESSAGE_AUTO_DELETE_TIMER_CHANGED = 'message_auto_delete_timer_changed' - """:obj:`str`: Messages with :attr:`Message.message_auto_delete_timer_changed`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.message_auto_delete_timer_changed`.""" MIGRATE_TO_CHAT_ID = 'migrate_to_chat_id' - """:obj:`str`: Messages with :attr:`Message.migrate_to_chat_id`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.migrate_to_chat_id`.""" MIGRATE_FROM_CHAT_ID = 'migrate_from_chat_id' - """:obj:`str`: Messages with :attr:`Message.migrate_from_chat_id`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.migrate_from_chat_id`.""" PINNED_MESSAGE = 'pinned_message' - """:obj:`str`: Messages with :attr:`Message.pinned_message`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.pinned_message`.""" PROXIMITY_ALERT_TRIGGERED = 'proximity_alert_triggered' - """:obj:`str`: Messages with :attr:`Message.proximity_alert_triggered`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.proximity_alert_triggered`.""" VOICE_CHAT_SCHEDULED = 'voice_chat_scheduled' - """:obj:`str`: Messages with :attr:`Message.voice_chat_scheduled`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.voice_chat_scheduled`.""" VOICE_CHAT_STARTED = 'voice_chat_started' - """:obj:`str`: Messages with :attr:`Message.voice_chat_started`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.voice_chat_started`.""" VOICE_CHAT_ENDED = 'voice_chat_ended' - """:obj:`str`: Messages with :attr:`Message.voice_chat_ended`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.voice_chat_ended`.""" VOICE_CHAT_PARTICIPANTS_INVITED = 'voice_chat_participants_invited' - """:obj:`str`: Messages with :attr:`Message.voice_chat_participants_invited`.""" + """:obj:`str`: Messages with :attr:`telegram.Message.voice_chat_participants_invited`.""" class ParseMode(_StringEnum): diff --git a/telegram/ext/_basepersistence.py b/telegram/ext/_basepersistence.py index 598d84dd2..22160c322 100644 --- a/telegram/ext/_basepersistence.py +++ b/telegram/ext/_basepersistence.py @@ -60,6 +60,11 @@ class BasePersistence(Generic[UD, CD, BD], ABC): """Interface class for adding persistence to your bot. Subclass this object for different implementations of a persistent bot. + Attention: + The interface provided by this class is intended to be accessed exclusively by + :class:`~telegram.ext.Dispatcher`. Calling any of the methods below manually might + interfere with the integration of persistence into :class:`~telegram.ext.Dispatcher`. + All relevant methods must be overwritten. This includes: * :meth:`get_bot_data` @@ -90,7 +95,7 @@ class BasePersistence(Generic[UD, CD, BD], ABC): Note: :meth:`replace_bot` and :meth:`insert_bot` are used *independently* of the implementation - of the :meth:`update/get_*` methods, i.e. you don't need to worry about it while + of the ``update/get_*`` methods, i.e. you don't need to worry about it while implementing a custom persistence subclass. .. versionchanged:: 14.0 @@ -191,17 +196,18 @@ class BasePersistence(Generic[UD, CD, BD], ABC): def replace_bot(cls, obj: object) -> object: """ Replaces all instances of :class:`telegram.Bot` that occur within the passed object with - :attr:`REPLACED_BOT`. Currently, this handles objects of type ``list``, ``tuple``, ``set``, - ``frozenset``, ``dict``, ``defaultdict`` and objects that have a ``__dict__`` or - ``__slots__`` attribute, excluding classes and objects that can't be copied with - ``copy.copy``. If the parsing of an object fails, the object will be returned unchanged and - the error will be logged. + :attr:`REPLACED_BOT`. Currently, this handles objects of type :class:`list`, + :class:`tuple`, :class:`set`, :class:`frozenset`, :class:`dict`, + :class:`collections.defaultdict` and objects that have a :attr:`~object.__dict__` or + :data:`~object.__slots__` attribute, excluding classes and objects that can't be copied + with :func:`copy.copy`. If the parsing of an object fails, the object will be returned + unchanged and the error will be logged. Args: obj (:obj:`object`): The object Returns: - :obj:`obj`: Copy of the object with Bot instances replaced. + :class:`object`: Copy of the object with Bot instances replaced. """ return cls._replace_bot(obj, {}) @@ -294,17 +300,18 @@ class BasePersistence(Generic[UD, CD, BD], ABC): def insert_bot(self, obj: object) -> object: """ Replaces all instances of :attr:`REPLACED_BOT` that occur within the passed object with - :attr:`bot`. Currently, this handles objects of type ``list``, ``tuple``, ``set``, - ``frozenset``, ``dict``, ``defaultdict`` and objects that have a ``__dict__`` or - ``__slots__`` attribute, excluding classes and objects that can't be copied with - ``copy.copy``. If the parsing of an object fails, the object will be returned unchanged and - the error will be logged. + :paramref:`bot`. Currently, this handles objects of type :class:`list`, + :class:`tuple`, :class:`set`, :class:`frozenset`, :class:`dict`, + :class:`collections.defaultdict` and objects that have a :attr:`~object.__dict__` or + :data:`~object.__slots__` attribute, excluding classes and objects that can't be copied + with :func:`copy.copy`. If the parsing of an object fails, the object will be returned + unchanged and the error will be logged. Args: obj (:obj:`object`): The object Returns: - :obj:`obj`: Copy of the object with Bot instances inserted. + :class:`object`: Copy of the object with Bot instances inserted. """ return self._insert_bot(obj, {}) @@ -460,7 +467,7 @@ class BasePersistence(Generic[UD, CD, BD], ABC): Returns: Optional[Tuple[List[Tuple[:obj:`str`, :obj:`float`, \ - Dict[:obj:`str`, :obj:`Any`]]], Dict[:obj:`str`, :obj:`str`]]]: + Dict[:obj:`str`, :class:`object`]]], Dict[:obj:`str`, :obj:`str`]]]: The restored meta data or :obj:`None`, if no data was stored. """ @@ -488,7 +495,7 @@ class BasePersistence(Generic[UD, CD, BD], ABC): Args: name (:obj:`str`): The handler's name. key (:obj:`tuple`): The key the state is changed for. - new_state (:obj:`tuple` | :obj:`Any`): The new state for the given key. + new_state (:obj:`tuple` | :class:`object`): The new state for the given key. """ @abstractmethod @@ -564,8 +571,8 @@ class BasePersistence(Generic[UD, CD, BD], ABC): @abstractmethod def refresh_user_data(self, user_id: int, user_data: UD) -> None: """Will be called by the :class:`telegram.ext.Dispatcher` before passing the - :attr:`user_data` to a callback. Can be used to update data stored in :attr:`user_data` - from an external source. + :attr:`~telegram.ext.Dispatcher.user_data` to a callback. Can be used to update data stored + in :attr:`~telegram.ext.Dispatcher.user_data` from an external source. .. versionadded:: 13.6 @@ -573,7 +580,8 @@ class BasePersistence(Generic[UD, CD, BD], ABC): Changed this method into an ``@abstractmethod``. Args: - user_id (:obj:`int`): The user ID this :attr:`user_data` is associated with. + user_id (:obj:`int`): The user ID this :attr:`~telegram.ext.Dispatcher.user_data` is + associated with. user_data (:obj:`dict` | :attr:`telegram.ext.ContextTypes.user_data`): The ``user_data`` of a single user. """ @@ -581,8 +589,8 @@ class BasePersistence(Generic[UD, CD, BD], ABC): @abstractmethod def refresh_chat_data(self, chat_id: int, chat_data: CD) -> None: """Will be called by the :class:`telegram.ext.Dispatcher` before passing the - :attr:`chat_data` to a callback. Can be used to update data stored in :attr:`chat_data` - from an external source. + :attr:`~telegram.ext.Dispatcher.chat_data` to a callback. Can be used to update data stored + in :attr:`~telegram.ext.Dispatcher.chat_data` from an external source. .. versionadded:: 13.6 @@ -590,7 +598,8 @@ class BasePersistence(Generic[UD, CD, BD], ABC): Changed this method into an ``@abstractmethod``. Args: - chat_id (:obj:`int`): The chat ID this :attr:`chat_data` is associated with. + chat_id (:obj:`int`): The chat ID this :attr:`~telegram.ext.Dispatcher.chat_data` is + associated with. chat_data (:obj:`dict` | :attr:`telegram.ext.ContextTypes.chat_data`): The ``chat_data`` of a single chat. """ @@ -598,8 +607,8 @@ class BasePersistence(Generic[UD, CD, BD], ABC): @abstractmethod def refresh_bot_data(self, bot_data: BD) -> None: """Will be called by the :class:`telegram.ext.Dispatcher` before passing the - :attr:`bot_data` to a callback. Can be used to update data stored in :attr:`bot_data` - from an external source. + :attr:`~telegram.ext.Dispatcher.bot_data` to a callback. Can be used to update data stored + in :attr:`~telegram.ext.Dispatcher.bot_data` from an external source. .. versionadded:: 13.6 diff --git a/telegram/ext/_builders.py b/telegram/ext/_builders.py index dadb96c03..4e9ebbb86 100644 --- a/telegram/ext/_builders.py +++ b/telegram/ext/_builders.py @@ -560,7 +560,7 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): """Sets the base URL to be used for :attr:`telegram.ext.Dispatcher.bot`. If not called, will default to ``'https://api.telegram.org/bot'``. - .. seealso:: :attr:`telegram.Bot.base_url`, `Local Bot API Server `_, :meth:`base_url` @@ -576,8 +576,8 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): """Sets the base file URL to be used for :attr:`telegram.ext.Dispatcher.bot`. If not called, will default to ``'https://api.telegram.org/file/bot'``. - .. seealso:: :attr:`telegram.Bot.base_file_url`, `Local Bot API Server `_, + .. seealso:: :paramref:`telegram.Bot.base_file_url`, `Local Bot API Server `_, :meth:`base_file_url` Args: @@ -589,7 +589,8 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): return self._set_base_file_url(base_file_url) def request_kwargs(self: BuilderType, request_kwargs: Dict[str, Any]) -> BuilderType: - """Sets keyword arguments that will be passed to the :class:`telegram.utils.Request` object + """Sets keyword arguments that will be passed to the + :class:`telegram.request.Request` object that is created when :attr:`telegram.ext.Dispatcher.bot` is created. If not called, no keyword arguments will be passed. @@ -604,13 +605,13 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): return self._set_request_kwargs(request_kwargs) def request(self: BuilderType, request: Request) -> BuilderType: - """Sets a :class:`telegram.utils.Request` object to be used for + """Sets a :class:`telegram.request.Request` object to be used for :attr:`telegram.ext.Dispatcher.bot`. .. seealso:: :meth:`request_kwargs` Args: - request (:class:`telegram.utils.Request`): The request object. + request (:class:`telegram.request.Request`): The request object. Returns: :class:`DispatcherBuilder`: The same builder with the updated argument. @@ -718,7 +719,7 @@ class DispatcherBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): :meth:`telegram.ext.Dispatcher.run_async`, i.e. the number of callbacks that can be run asynchronously at the same time. - .. seealso:: :attr:`telegram.ext.Handler.run_sync`, + .. seealso:: :paramref:`telegram.ext.Handler.run_async`, :attr:`telegram.ext.Defaults.run_async` Args: @@ -927,7 +928,7 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): """Sets the base URL to be used for :attr:`telegram.ext.Updater.bot`. If not called, will default to ``'https://api.telegram.org/bot'``. - .. seealso:: :attr:`telegram.Bot.base_url`, `Local Bot API Server `_, :meth:`base_url` @@ -943,8 +944,8 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): """Sets the base file URL to be used for :attr:`telegram.ext.Updater.bot`. If not called, will default to ``'https://api.telegram.org/file/bot'``. - .. seealso:: :attr:`telegram.Bot.base_file_url`, `Local Bot API Server `_, + .. seealso:: :paramref:`telegram.Bot.base_file_url`, `Local Bot API Server `_, :meth:`base_file_url` Args: @@ -956,8 +957,8 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): return self._set_base_file_url(base_file_url) def request_kwargs(self: BuilderType, request_kwargs: Dict[str, Any]) -> BuilderType: - """Sets keyword arguments that will be passed to the :class:`telegram.utils.Request` object - that is created when :attr:`telegram.ext.Updater.bot` is created. If not called, no + """Sets keyword arguments that will be passed to the :class:`telegram.request.Request` + object that is created when :attr:`telegram.ext.Updater.bot` is created. If not called, no keyword arguments will be passed. .. seealso:: :meth:`request` @@ -971,13 +972,13 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): return self._set_request_kwargs(request_kwargs) def request(self: BuilderType, request: Request) -> BuilderType: - """Sets a :class:`telegram.utils.Request` object to be used for + """Sets a :class:`telegram.request.Request` object to be used for :attr:`telegram.ext.Updater.bot`. .. seealso:: :meth:`request_kwargs` Args: - request (:class:`telegram.utils.Request`): The request object. + request (:class:`telegram.request.Request`): The request object. Returns: :class:`UpdaterBuilder`: The same builder with the updated argument. @@ -1087,7 +1088,7 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): :meth:`telegram.ext.Dispatcher.run_async`, i.e. the number of callbacks that can be run asynchronously at the same time. - .. seealso:: :attr:`telegram.ext.Handler.run_sync`, + .. seealso:: :paramref:`telegram.ext.Handler.run_async`, :attr:`telegram.ext.Defaults.run_async` Args: @@ -1229,9 +1230,9 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): self: BuilderType, user_signal_handler: Callable[[int, object], Any] ) -> BuilderType: """Sets a callback to be used for :attr:`telegram.ext.Updater.user_signal_handler`. - The callback will be called when :meth:`telegram.ext.Updater.idle()` receives a signal. + The callback will be called when :meth:`telegram.ext.Updater.idle` receives a signal. It will be called with the two arguments ``signum, frame`` as for the - :meth:`signal.signal` of the standard library. + :func:`signal.signal` of the standard library. Note: Signal handlers are an advanced feature that come with some culprits and are not thread @@ -1241,7 +1242,7 @@ class UpdaterBuilder(_BaseBuilder[ODT, BT, CCT, UD, CD, BD, JQ, PT]): be executed after the updater has shut down. Args: - user_signal_handler (Callable[signum, frame]): The signal handler. + user_signal_handler (Callable[`signum, frame`]): The signal handler. Returns: :class:`UpdaterBuilder`: The same builder with the updated argument. diff --git a/telegram/ext/_callbackcontext.py b/telegram/ext/_callbackcontext.py index 4663243a7..104919564 100644 --- a/telegram/ext/_callbackcontext.py +++ b/telegram/ext/_callbackcontext.py @@ -64,7 +64,7 @@ class CallbackContext(Generic[BT, UD, CD, BD]): Warning: Do not combine custom attributes and ``@run_async``/ - :meth:`telegram.ext.Disptacher.run_async`. Due to how ``run_async`` works, it will + :func:`telegram.ext.Dispatcher.run_async`. Due to how ``run_async`` works, it will almost certainly execute the callbacks for an update out of order, and the attributes that you think you added will not be present. @@ -72,7 +72,8 @@ class CallbackContext(Generic[BT, UD, CD, BD]): dispatcher (:class:`telegram.ext.Dispatcher`): The dispatcher associated with this context. Attributes: - matches (List[:obj:`re match object`]): Optional. If the associated update originated from + matches (List[:meth:`re.Match `]): Optional. If the associated update + originated from a :class:`filters.Regex`, this will contain a list of match objects for every pattern where ``re.search(pattern, string)`` returned a match. Note that filters short circuit, so combined regex filters will not always be evaluated. diff --git a/telegram/ext/_callbackdatacache.py b/telegram/ext/_callbackdatacache.py index fdab20521..8c8c4c020 100644 --- a/telegram/ext/_callbackdatacache.py +++ b/telegram/ext/_callbackdatacache.py @@ -109,7 +109,7 @@ class CallbackDataCache: Defaults to 1024. persistent_data (Tuple[List[Tuple[:obj:`str`, :obj:`float`, \ - Dict[:obj:`str`, :obj:`Any`]]], Dict[:obj:`str`, :obj:`str`]], optional): \ + Dict[:obj:`str`, :class:`object`]]], Dict[:obj:`str`, :obj:`str`]], optional): \ Data to initialize the cache with, as returned by \ :meth:`telegram.ext.BasePersistence.get_callback_data`. @@ -146,7 +146,7 @@ class CallbackDataCache: @property def persistence_data(self) -> CDCData: - """Tuple[List[Tuple[:obj:`str`, :obj:`float`, Dict[:obj:`str`, :obj:`Any`]]], + """Tuple[List[Tuple[:obj:`str`, :obj:`float`, Dict[:obj:`str`, :class:`object`]]], Dict[:obj:`str`, :obj:`str`]]: The data that needs to be persisted to allow caching callback data across bot reboots. """ @@ -160,7 +160,8 @@ class CallbackDataCache: def process_keyboard(self, reply_markup: InlineKeyboardMarkup) -> InlineKeyboardMarkup: """Registers the reply markup to the cache. If any of the buttons have - :attr:`callback_data`, stores that data and builds a new keyboard with the correspondingly + :attr:`~telegram.InlineKeyboardButton.callback_data`, stores that data and builds a new + keyboard with the correspondingly replaced buttons. Otherwise does nothing and returns the original reply markup. Args: @@ -307,8 +308,9 @@ class CallbackDataCache: """Replaces the data in the callback query and the attached messages keyboard with the cached objects, if necessary. If the data could not be found, :class:`telegram.ext.InvalidCallbackData` will be inserted. - If :attr:`callback_query.data` or :attr:`callback_query.message` is present, this also - saves the callback queries ID in order to be able to resolve it to the stored data. + If :attr:`telegram.CallbackQuery.data` or :attr:`telegram.CallbackQuery.message` is + present, this also saves the callback queries ID in order to be able to resolve it to the + stored data. Note: Also considers inserts data into the buttons of diff --git a/telegram/ext/_callbackqueryhandler.py b/telegram/ext/_callbackqueryhandler.py index 9b135e1ac..450a8350c 100644 --- a/telegram/ext/_callbackqueryhandler.py +++ b/telegram/ext/_callbackqueryhandler.py @@ -44,20 +44,22 @@ RT = TypeVar('RT') class CallbackQueryHandler(Handler[Update, CCT]): """Handler class to handle Telegram callback queries. Optionally based on a regex. - Read the documentation of the ``re`` module for more information. + Read the documentation of the :mod:`re` module for more information. Note: - * If your bot allows arbitrary objects as ``callback_data``, it may happen that the - original ``callback_data`` for the incoming :class:`telegram.CallbackQuery`` can not be - found. This is the case when either a malicious client tempered with the - ``callback_data`` or the data was simply dropped from cache or not persisted. In these + * If your bot allows arbitrary objects as + :paramref:`~telegram.InlineKeyboardButton.callback_data`, it may happen that the + original :attr:`~telegram.InlineKeyboardButton.callback_data` for the incoming + :class:`telegram.CallbackQuery` can not be found. This is the case when either a + malicious client tempered with the :attr:`telegram.CallbackQuery.data` or the data was + simply dropped from cache or not persisted. In these cases, an instance of :class:`telegram.ext.InvalidCallbackData` will be set as - ``callback_data``. + :attr:`telegram.CallbackQuery.data`. .. versionadded:: 13.6 Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: @@ -69,7 +71,7 @@ class CallbackQueryHandler(Handler[Update, CCT]): :class:`telegram.ext.ConversationHandler`. pattern (:obj:`str` | `Pattern` | :obj:`callable` | :obj:`type`, optional): Pattern to test :attr:`telegram.CallbackQuery.data` against. If a string or a regex - pattern is passed, :meth:`re.match` is used on :attr:`telegram.CallbackQuery.data` to + pattern is passed, :func:`re.match` is used on :attr:`telegram.CallbackQuery.data` to determine if an update should be handled by this handler. If your bot allows arbitrary objects as ``callback_data``, non-strings will be accepted. To filter arbitrary objects you may pass diff --git a/telegram/ext/_chatjoinrequesthandler.py b/telegram/ext/_chatjoinrequesthandler.py index 47b830579..7505e35c3 100644 --- a/telegram/ext/_chatjoinrequesthandler.py +++ b/telegram/ext/_chatjoinrequesthandler.py @@ -29,7 +29,7 @@ class ChatJoinRequestHandler(Handler[Update, CCT]): """Handler class to handle Telegram updates that contain a chat join request. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. .. versionadded:: 13.8 diff --git a/telegram/ext/_chatmemberhandler.py b/telegram/ext/_chatmemberhandler.py index eecb3ef28..3e0978cf9 100644 --- a/telegram/ext/_chatmemberhandler.py +++ b/telegram/ext/_chatmemberhandler.py @@ -33,7 +33,7 @@ class ChatMemberHandler(Handler[Update, CCT]): .. versionadded:: 13.4 Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: diff --git a/telegram/ext/_choseninlineresulthandler.py b/telegram/ext/_choseninlineresulthandler.py index 4831550c9..b8a667cdb 100644 --- a/telegram/ext/_choseninlineresulthandler.py +++ b/telegram/ext/_choseninlineresulthandler.py @@ -35,7 +35,7 @@ class ChosenInlineResultHandler(Handler[Update, CCT]): """Handler class to handle Telegram updates that contain a chosen inline result. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: @@ -47,7 +47,8 @@ class ChosenInlineResultHandler(Handler[Update, CCT]): :class:`telegram.ext.ConversationHandler`. run_async (:obj:`bool`): Determines whether the callback will run asynchronously. Defaults to :obj:`False`. - pattern (:obj:`str` | `Pattern`, optional): Regex pattern. If not :obj:`None`, ``re.match`` + pattern (:obj:`str` | :func:`re.Pattern `, optional): Regex pattern. If not + :obj:`None`, :func:`re.match` is used on :attr:`telegram.ChosenInlineResult.result_id` to determine if an update should be handled by this handler. This is accessible in the callback as :attr:`telegram.ext.CallbackContext.matches`. diff --git a/telegram/ext/_commandhandler.py b/telegram/ext/_commandhandler.py index 5a762ba80..a4f0b86af 100644 --- a/telegram/ext/_commandhandler.py +++ b/telegram/ext/_commandhandler.py @@ -47,7 +47,7 @@ class CommandHandler(Handler[Update, CCT]): * :class:`CommandHandler` does *not* handle (edited) channel posts. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: @@ -60,7 +60,7 @@ class CommandHandler(Handler[Update, CCT]): The return value of the callback is usually ignored except for the special case of :class:`telegram.ext.ConversationHandler`. - filters (:class:`telegram.ext.BaseFilter`, optional): A filter inheriting from + filters (:class:`telegram.ext.filters.BaseFilter`, optional): A filter inheriting from :class:`telegram.ext.filters.BaseFilter`. Standard filters can be found in :mod:`telegram.ext.filters`. Filters can be combined using bitwise operators (& for and, | for or, ~ for not). @@ -75,7 +75,7 @@ class CommandHandler(Handler[Update, CCT]): The command or list of commands this handler should listen for. Limitations are the same as described here https://core.telegram.org/bots#commands callback (:obj:`callable`): The callback function for this handler. - filters (:class:`telegram.ext.BaseFilter`): Optional. Only allow updates with these + filters (:class:`telegram.ext.filters.BaseFilter`): Optional. Only allow updates with these Filters. run_async (:obj:`bool`): Determines whether the callback will run asynchronously. """ @@ -194,7 +194,7 @@ class PrefixHandler(CommandHandler): * :class:`PrefixHandler` does *not* handle (edited) channel posts. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: @@ -208,7 +208,7 @@ class PrefixHandler(CommandHandler): The return value of the callback is usually ignored except for the special case of :class:`telegram.ext.ConversationHandler`. - filters (:class:`telegram.ext.BaseFilter`, optional): A filter inheriting from + filters (:class:`telegram.ext.filters.BaseFilter`, optional): A filter inheriting from :class:`telegram.ext.filters.BaseFilter`. Standard filters can be found in :mod:`telegram.ext.filters`. Filters can be combined using bitwise operators (& for and, | for or, ~ for not). @@ -217,7 +217,7 @@ class PrefixHandler(CommandHandler): Attributes: callback (:obj:`callable`): The callback function for this handler. - filters (:class:`telegram.ext.BaseFilter`): Optional. Only allow updates with these + filters (:class:`telegram.ext.filters.BaseFilter`): Optional. Only allow updates with these Filters. run_async (:obj:`bool`): Determines whether the callback will run asynchronously. diff --git a/telegram/ext/_contexttypes.py b/telegram/ext/_contexttypes.py index 5f613be24..4e8fc2117 100644 --- a/telegram/ext/_contexttypes.py +++ b/telegram/ext/_contexttypes.py @@ -194,16 +194,22 @@ class ContextTypes(Generic[CCT, UD, CD, BD]): @property def context(self) -> Type[CCT]: + """The type of the ``context`` argument of all (error-)handler callbacks and job + callbacks. + """ return self._context @property def bot_data(self) -> Type[BD]: + """The type of ``context.bot_data`` of all (error-)handler callbacks and job callbacks.""" return self._bot_data @property def chat_data(self) -> Type[CD]: + """The type of ``context.chat_data`` of all (error-)handler callbacks and job callbacks.""" return self._chat_data @property def user_data(self) -> Type[UD]: + """The type of ``context.user_data`` of all (error-)handler callbacks and job callbacks.""" return self._user_data diff --git a/telegram/ext/_defaults.py b/telegram/ext/_defaults.py index d9e9cd9af..987e8c0c5 100644 --- a/telegram/ext/_defaults.py +++ b/telegram/ext/_defaults.py @@ -131,7 +131,7 @@ class Defaults: @property def explanation_parse_mode(self) -> Optional[str]: - """:obj:`str`: Optional. Alias for :attr:`parse_mode`, used for + """:obj:`str`: Optional. Alias for :paramref:`parse_mode`, used for the corresponding parameter of :meth:`telegram.Bot.send_poll`. """ return self._parse_mode diff --git a/telegram/ext/_dictpersistence.py b/telegram/ext/_dictpersistence.py index 6ea7bb17c..bf5e60495 100644 --- a/telegram/ext/_dictpersistence.py +++ b/telegram/ext/_dictpersistence.py @@ -33,6 +33,11 @@ except ImportError: class DictPersistence(BasePersistence): """Using Python's :obj:`dict` and ``json`` for making your bot persistent. + Attention: + The interface provided by this class is intended to be accessed exclusively by + :class:`~telegram.ext.Dispatcher`. Calling any of the methods below manually might + interfere with the integration of persistence into :class:`~telegram.ext.Dispatcher`. + Note: This class does *not* implement a :meth:`flush` method, meaning that data managed by ``DictPersistence`` is in-memory only and will be lost when the bot shuts down. This is, @@ -41,7 +46,7 @@ class DictPersistence(BasePersistence): Warning: :class:`DictPersistence` will try to replace :class:`telegram.Bot` instances by - :attr:`REPLACED_BOT` and insert the bot set with + :attr:`~telegram.ext.BasePersistence.REPLACED_BOT` and insert the bot set with :meth:`telegram.ext.BasePersistence.set_bot` upon loading of the data. This is to ensure that changes to the bot apply to the saved objects, too. If you change the bots token, this may lead to e.g. ``Chat not found`` errors. For the limitations on replacing bots see @@ -202,7 +207,7 @@ class DictPersistence(BasePersistence): @property def callback_data(self) -> Optional[CDCData]: - """Tuple[List[Tuple[:obj:`str`, :obj:`float`, Dict[:obj:`str`, :obj:`Any`]]], \ + """Tuple[List[Tuple[:obj:`str`, :obj:`float`, Dict[:obj:`str`, :class:`object`]]], \ Dict[:obj:`str`, :obj:`str`]]: The metadata on the stored callback data. .. versionadded:: 13.6 @@ -267,7 +272,7 @@ class DictPersistence(BasePersistence): .. versionadded:: 13.6 Returns: - Tuple[List[Tuple[:obj:`str`, :obj:`float`, Dict[:obj:`str`, :obj:`Any`]]], \ + Tuple[List[Tuple[:obj:`str`, :obj:`float`, Dict[:obj:`str`, :class:`object`]]], \ Dict[:obj:`str`, :obj:`str`]]: The restored metadata or :obj:`None`, \ if no data was stored. """ @@ -295,7 +300,7 @@ class DictPersistence(BasePersistence): Args: name (:obj:`str`): The handler's name. key (:obj:`tuple`): The key the state is changed for. - new_state (:obj:`tuple` | :obj:`Any`): The new state for the given key. + new_state (:obj:`tuple` | :class:`object`): The new state for the given key. """ if not self._conversations: self._conversations = {} @@ -349,7 +354,7 @@ class DictPersistence(BasePersistence): .. versionadded:: 13.6 Args: - data (Tuple[List[Tuple[:obj:`str`, :obj:`float`, Dict[:obj:`str`, :obj:`Any`]]], \ + data (Tuple[List[Tuple[:obj:`str`, :obj:`float`, Dict[:obj:`str`, :class:`object`]]], \ Dict[:obj:`str`, :obj:`str`]]): The relevant data to restore :class:`telegram.ext.CallbackDataCache`. """ diff --git a/telegram/ext/_dispatcher.py b/telegram/ext/_dispatcher.py index 9d9d2e9a5..46ab4171a 100644 --- a/telegram/ext/_dispatcher.py +++ b/telegram/ext/_dispatcher.py @@ -109,7 +109,7 @@ class Dispatcher(Generic[BT, CCT, UD, CD, BD, JQ, PT]): Attributes: bot (:class:`telegram.Bot`): The bot object that should be passed to the handlers. - update_queue (:obj:`Queue`): The synchronized queue that will contain the updates. + update_queue (:class:`queue.Queue`): The synchronized queue that will contain the updates. job_queue (:class:`telegram.ext.JobQueue`): Optional. The :class:`telegram.ext.JobQueue` instance to pass onto handler callbacks. workers (:obj:`int`, optional): Number of maximum concurrent worker threads for the @@ -120,7 +120,7 @@ class Dispatcher(Generic[BT, CCT, UD, CD, BD, JQ, PT]): .. versionchanged:: 14.0 :attr:`chat_data` is now read-only - .. tip:: + Tip: Manually modifying :attr:`chat_data` is almost never needed and unadvisable. user_data (:obj:`types.MappingProxyType`): A dictionary handlers can use to store data for @@ -129,7 +129,7 @@ class Dispatcher(Generic[BT, CCT, UD, CD, BD, JQ, PT]): .. versionchanged:: 14.0 :attr:`user_data` is now read-only - .. tip:: + Tip: Manually modifying :attr:`user_data` is almost never needed and unadvisable. bot_data (:obj:`dict`): A dictionary handlers can use to store data for the bot. @@ -154,6 +154,8 @@ class Dispatcher(Generic[BT, CCT, UD, CD, BD, JQ, PT]): .. seealso:: :meth:`start`, :meth:`stop` + context_types (:class:`telegram.ext.ContextTypes`): Specifies the types used by this + dispatcher for the ``context`` argument of handler and job callbacks. """ @@ -373,11 +375,11 @@ class Dispatcher(Generic[BT, CCT, UD, CD, BD, JQ, PT]): Args: func (:obj:`callable`): The function to run in the thread. - *args (:obj:`tuple`, optional): Arguments to ``func``. + *args (:obj:`tuple`, optional): Arguments to :paramref:`func`. update (:class:`telegram.Update` | :obj:`object`, optional): The update associated with the functions call. If passed, it will be available in the error handlers, in case - an exception is raised by :attr:`func`. - **kwargs (:obj:`dict`, optional): Keyword arguments to ``func``. + an exception is raised by :paramref:`func`. + **kwargs (:obj:`dict`, optional): Keyword arguments to :paramref:`func`. Returns: Promise @@ -693,7 +695,7 @@ class Dispatcher(Generic[BT, CCT, UD, CD, BD, JQ, PT]): * The key `old_chat_id` of :attr:`chat_data` will be deleted Args: - message (:class:`Message`, optional): A message with either + message (:class:`telegram.Message`, optional): A message with either :attr:`telegram.Message.migrate_from_chat_id` or :attr:`telegram.Message.migrate_to_chat_id`. Mutually exclusive with passing ``old_chat_id`` and ``new_chat_id`` @@ -846,8 +848,6 @@ class Dispatcher(Generic[BT, CCT, UD, CD, BD, JQ, PT]): Args: update (:obj:`object` | :class:`telegram.Update`): The update that caused the error. error (:obj:`Exception`): The error that was raised. - promise (:class:`telegram._utils.Promise`, optional): The promise whose pooled function - raised the error. job (:class:`telegram.ext.Job`, optional): The job that caused the error. .. versionadded:: 14.0 diff --git a/telegram/ext/_extbot.py b/telegram/ext/_extbot.py index 5aed2380b..ba0493957 100644 --- a/telegram/ext/_extbot.py +++ b/telegram/ext/_extbot.py @@ -202,7 +202,7 @@ class ExtBot(Bot): *In place*, i.e. the passed :class:`telegram.Message` will be changed! Args: - update (:class`telegram.Update`): The update. + update (:class:`telegram.Update`): The update. """ # The only incoming updates that can directly contain a message sent by the bot itself are: diff --git a/telegram/ext/_handler.py b/telegram/ext/_handler.py index 49ec8976c..83fb42714 100644 --- a/telegram/ext/_handler.py +++ b/telegram/ext/_handler.py @@ -36,7 +36,7 @@ class Handler(Generic[UT, CCT], ABC): """The base class for all update handlers. Create custom handlers by inheriting from it. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: @@ -76,10 +76,10 @@ class Handler(Generic[UT, CCT], ABC): Note: Custom updates types can be handled by the dispatcher. Therefore, an implementation of - this method should always check the type of :attr:`update`. + this method should always check the type of :paramref:`update`. Args: - update (:obj:`str` | :class:`telegram.Update`): The update to be tested. + update (:obj:`object` | :class:`telegram.Update`): The update to be tested. Returns: Either :obj:`None` or :obj:`False` if the update should not be handled. Otherwise an @@ -105,7 +105,7 @@ class Handler(Generic[UT, CCT], ABC): Args: update (:obj:`str` | :class:`telegram.Update`): The update to be handled. dispatcher (:class:`telegram.ext.Dispatcher`): The calling dispatcher. - check_result (:obj:`obj`): The result from :attr:`check_update`. + check_result (:class:`object`): The result from :attr:`check_update`. context (:class:`telegram.ext.CallbackContext`): The context as provided by the dispatcher. diff --git a/telegram/ext/_inlinequeryhandler.py b/telegram/ext/_inlinequeryhandler.py index 60883d026..95a249074 100644 --- a/telegram/ext/_inlinequeryhandler.py +++ b/telegram/ext/_inlinequeryhandler.py @@ -44,10 +44,10 @@ RT = TypeVar('RT') class InlineQueryHandler(Handler[Update, CCT]): """ Handler class to handle Telegram inline queries. Optionally based on a regex. Read the - documentation of the ``re`` module for more information. + documentation of the :mod:`re` module for more information. Warning: - * When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + * When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. * :attr:`telegram.InlineQuery.chat_type` will not be set for inline queries from secret chats and may not be set for inline queries coming from third-party clients. These @@ -60,9 +60,9 @@ class InlineQueryHandler(Handler[Update, CCT]): The return value of the callback is usually ignored except for the special case of :class:`telegram.ext.ConversationHandler`. - pattern (:obj:`str` | :obj:`Pattern`, optional): Regex pattern. If not :obj:`None`, - ``re.match`` is used on :attr:`telegram.InlineQuery.query` to determine if an update - should be handled by this handler. + pattern (:obj:`str` | :func:`re.Pattern `, optional): Regex pattern. + If not :obj:`None`, :func:`re.match` is used on :attr:`telegram.InlineQuery.query` + to determine if an update should be handled by this handler. chat_types (List[:obj:`str`], optional): List of allowed chat types. If passed, will only handle inline queries with the appropriate :attr:`telegram.InlineQuery.chat_type`. @@ -72,7 +72,7 @@ class InlineQueryHandler(Handler[Update, CCT]): Attributes: callback (:obj:`callable`): The callback function for this handler. - pattern (:obj:`str` | :obj:`Pattern`): Optional. Regex pattern to test + pattern (:obj:`str` | :func:`re.Pattern `): Optional. Regex pattern to test :attr:`telegram.InlineQuery.query` against. chat_types (List[:obj:`str`], optional): List of allowed chat types. diff --git a/telegram/ext/_jobqueue.py b/telegram/ext/_jobqueue.py index 0498325e3..45216569f 100644 --- a/telegram/ext/_jobqueue.py +++ b/telegram/ext/_jobqueue.py @@ -182,7 +182,7 @@ class JobQueue: job_kwargs: JSONDict = None, ) -> 'Job': """Creates a new :class:`Job` instance that runs at specified intervals and adds it to the - queue. + queue. Note: For a note about DST, please see the documentation of `APScheduler`_. @@ -277,10 +277,6 @@ class JobQueue: ) -> 'Job': """Creates a new :class:`Job` that runs on a monthly basis and adds it to the queue. - .. versionchanged:: 14.0 - The ``day_is_strict`` argument was removed. Instead one can now pass -1 to the ``day`` - parameter to have the job run on the last day of the month. - .. versionchanged:: 14.0 The ``day_is_strict`` argument was removed. Instead one can now pass -1 to the ``day`` parameter to have the job run on the last day of the month. @@ -349,7 +345,8 @@ class JobQueue: callback (:obj:`callable`): The callback function that should be executed by the new job. Callback signature: ``def callback(context: CallbackContext)`` time (:obj:`datetime.time`): Time of day at which the job should run. If the timezone - (:obj:`time.tzinfo`) is :obj:`None`, the default timezone of the bot will be used. + (:obj:`datetime.time.tzinfo`) is :obj:`None`, the default timezone of the bot will + be used. days (Tuple[:obj:`int`], optional): Defines on which days of the week the job should run (where ``0-6`` correspond to monday - sunday). Defaults to ``EVERY_DAY`` context (:obj:`object`, optional): Additional data needed for the callback function. @@ -450,7 +447,7 @@ class Job: instance. Objects of this class are comparable in terms of equality. Two objects of this class are - considered equal, if their :attr:`id` is equal. + considered equal, if their :class:`id ` is equal. Note: * All attributes and instance methods of :attr:`job` are also directly available as @@ -461,7 +458,7 @@ class Job: this :class:`telegram.ext.Job` to be useful. .. versionchanged:: 14.0 - Removed argument and attribute :attr:`job_queue`. + Removed argument and attribute ``job_queue``. Args: callback (:obj:`callable`): The callback function that should be executed by the new job. diff --git a/telegram/ext/_messagehandler.py b/telegram/ext/_messagehandler.py index 8d20fbb15..df78956b6 100644 --- a/telegram/ext/_messagehandler.py +++ b/telegram/ext/_messagehandler.py @@ -35,16 +35,16 @@ class MessageHandler(Handler[Update, CCT]): """Handler class to handle telegram messages. They might contain text, media or status updates. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: - filters (:class:`telegram.ext.BaseFilter`): A filter inheriting from + filters (:class:`telegram.ext.filters.BaseFilter`): A filter inheriting from :class:`telegram.ext.filters.BaseFilter`. Standard filters can be found in :mod:`telegram.ext.filters`. Filters can be combined using bitwise operators (& for and, | for or, ~ for not). This defaults to all message updates - being: :attr:`Update.message`, :attr:`Update.edited_message`, - :attr:`Update.channel_post` and :attr:`Update.edited_channel_post`. + being: :attr:`telegram.Update.message`, :attr:`telegram.Update.edited_message`, + :attr:`telegram.Update.channel_post` and :attr:`telegram.Update.edited_channel_post`. If you don't want or need any of those pass ``~filters.UpdateType.*`` in the filter argument. callback (:obj:`callable`): The callback function for this handler. Will be called when diff --git a/telegram/ext/_picklepersistence.py b/telegram/ext/_picklepersistence.py index bf2d6b70d..487c3ae31 100644 --- a/telegram/ext/_picklepersistence.py +++ b/telegram/ext/_picklepersistence.py @@ -37,9 +37,14 @@ from telegram.ext._utils.types import UD, CD, BD, ConversationDict, CDCData class PicklePersistence(BasePersistence[UD, CD, BD]): """Using python's builtin pickle for making your bot persistent. + Attention: + The interface provided by this class is intended to be accessed exclusively by + :class:`~telegram.ext.Dispatcher`. Calling any of the methods below manually might + interfere with the integration of persistence into :class:`~telegram.ext.Dispatcher`. + Warning: :class:`PicklePersistence` will try to replace :class:`telegram.Bot` instances by - :attr:`REPLACED_BOT` and insert the bot set with + :attr:`~telegram.ext.BasePersistence.REPLACED_BOT` and insert the bot set with :meth:`telegram.ext.BasePersistence.set_bot` upon loading of the data. This is to ensure that changes to the bot apply to the saved objects, too. If you change the bots token, this may lead to e.g. ``Chat not found`` errors. For the limitations on replacing bots see @@ -252,7 +257,7 @@ class PicklePersistence(BasePersistence[UD, CD, BD]): Returns: Optional[Tuple[List[Tuple[:obj:`str`, :obj:`float`, \ - Dict[:obj:`str`, :obj:`Any`]]], Dict[:obj:`str`, :obj:`str`]]]: + Dict[:obj:`str`, :class:`object`]]], Dict[:obj:`str`, :obj:`str`]]]: The restored metadata or :obj:`None`, if no data was stored. """ if self.callback_data: @@ -297,7 +302,7 @@ class PicklePersistence(BasePersistence[UD, CD, BD]): Args: name (:obj:`str`): The handler's name. key (:obj:`tuple`): The key the state is changed for. - new_state (:obj:`tuple` | :obj:`Any`): The new state for the given key. + new_state (:obj:`tuple` | :class:`object`): The new state for the given key. """ if not self.conversations: self.conversations = {} @@ -370,7 +375,7 @@ class PicklePersistence(BasePersistence[UD, CD, BD]): Args: data (Tuple[List[Tuple[:obj:`str`, :obj:`float`, \ - Dict[:obj:`str`, :obj:`Any`]]], Dict[:obj:`str`, :obj:`str`]]): + Dict[:obj:`str`, :class:`object`]]], Dict[:obj:`str`, :obj:`str`]]): The relevant data to restore :class:`telegram.ext.CallbackDataCache`. """ if self.callback_data == data: @@ -383,7 +388,7 @@ class PicklePersistence(BasePersistence[UD, CD, BD]): self._dump_singlefile() def drop_chat_data(self, chat_id: int) -> None: - """Will delete the specified key from the :attr:`chat_data` and depending on + """Will delete the specified key from the ``chat_data`` and depending on :attr:`on_flush` save the pickle file. .. versionadded:: 14.0 @@ -402,7 +407,7 @@ class PicklePersistence(BasePersistence[UD, CD, BD]): self._dump_singlefile() def drop_user_data(self, user_id: int) -> None: - """Will delete the specified key from the :attr:`user_data` and depending on + """Will delete the specified key from the ``user_data`` and depending on :attr:`on_flush` save the pickle file. .. versionadded:: 14.0 diff --git a/telegram/ext/_pollanswerhandler.py b/telegram/ext/_pollanswerhandler.py index aa4630fee..c546de2ef 100644 --- a/telegram/ext/_pollanswerhandler.py +++ b/telegram/ext/_pollanswerhandler.py @@ -29,7 +29,7 @@ class PollAnswerHandler(Handler[Update, CCT]): """Handler class to handle Telegram updates that contain a poll answer. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: diff --git a/telegram/ext/_pollhandler.py b/telegram/ext/_pollhandler.py index 45bcfe5c1..35107d07a 100644 --- a/telegram/ext/_pollhandler.py +++ b/telegram/ext/_pollhandler.py @@ -29,7 +29,7 @@ class PollHandler(Handler[Update, CCT]): """Handler class to handle Telegram updates that contain a poll. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: diff --git a/telegram/ext/_precheckoutqueryhandler.py b/telegram/ext/_precheckoutqueryhandler.py index 37c7aae43..90e85482e 100644 --- a/telegram/ext/_precheckoutqueryhandler.py +++ b/telegram/ext/_precheckoutqueryhandler.py @@ -28,7 +28,7 @@ class PreCheckoutQueryHandler(Handler[Update, CCT]): """Handler class to handle Telegram PreCheckout callback queries. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: diff --git a/telegram/ext/_shippingqueryhandler.py b/telegram/ext/_shippingqueryhandler.py index 078f3614d..cf9b7eb1b 100644 --- a/telegram/ext/_shippingqueryhandler.py +++ b/telegram/ext/_shippingqueryhandler.py @@ -28,7 +28,7 @@ class ShippingQueryHandler(Handler[Update, CCT]): """Handler class to handle Telegram shipping callback queries. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: diff --git a/telegram/ext/_stringcommandhandler.py b/telegram/ext/_stringcommandhandler.py index 556e217e1..10d08d8ee 100644 --- a/telegram/ext/_stringcommandhandler.py +++ b/telegram/ext/_stringcommandhandler.py @@ -41,7 +41,7 @@ class StringCommandHandler(Handler[str, CCT]): put in the queue. For example to send messages with the bot using command line or API. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: diff --git a/telegram/ext/_stringregexhandler.py b/telegram/ext/_stringregexhandler.py index 919e56f94..a90606d4e 100644 --- a/telegram/ext/_stringregexhandler.py +++ b/telegram/ext/_stringregexhandler.py @@ -34,19 +34,19 @@ RT = TypeVar('RT') class StringRegexHandler(Handler[str, CCT]): """Handler class to handle string updates based on a regex which checks the update content. - Read the documentation of the ``re`` module for more information. The ``re.match`` function is - used to determine if an update should be handled by this handler. + Read the documentation of the :mod:`re` module for more information. The :func:`re.match` + function is used to determine if an update should be handled by this handler. Note: This handler is not used to handle Telegram :attr:`telegram.Update`, but strings manually put in the queue. For example to send messages with the bot using command line or API. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: - pattern (:obj:`str` | :obj:`Pattern`): The regex pattern. + pattern (:obj:`str` | :func:`re.Pattern `): The regex pattern. callback (:obj:`callable`): The callback function for this handler. Will be called when :attr:`check_update` has determined that an update should be processed by this handler. Callback signature: ``def callback(update: Update, context: CallbackContext)`` @@ -57,7 +57,7 @@ class StringRegexHandler(Handler[str, CCT]): Defaults to :obj:`False`. Attributes: - pattern (:obj:`str` | :obj:`Pattern`): The regex pattern. + pattern (:obj:`str` | :func:`re.Pattern `): The regex pattern. callback (:obj:`callable`): The callback function for this handler. run_async (:obj:`bool`): Determines whether the callback will run asynchronously. diff --git a/telegram/ext/_typehandler.py b/telegram/ext/_typehandler.py index eb4dc2720..2696d2325 100644 --- a/telegram/ext/_typehandler.py +++ b/telegram/ext/_typehandler.py @@ -32,7 +32,7 @@ class TypeHandler(Handler[UT, CCT]): """Handler class to handle updates of custom types. Warning: - When setting ``run_async`` to :obj:`True`, you cannot rely on adding custom + When setting :paramref:`run_async` to :obj:`True`, you cannot rely on adding custom attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info. Args: diff --git a/telegram/ext/_updater.py b/telegram/ext/_updater.py index 689a59e7b..f6b2b3431 100644 --- a/telegram/ext/_updater.py +++ b/telegram/ext/_updater.py @@ -76,12 +76,12 @@ class Updater(Generic[BT, DT]): Attributes: bot (:class:`telegram.Bot`): The bot used with this Updater. - user_signal_handler (:obj:`function`): Optional. Function to be called when a signal is + user_signal_handler (Callable): Optional. Function to be called when a signal is received. .. versionchanged:: 14.0 Renamed ``user_sig_handler`` to ``user_signal_handler``. - update_queue (:obj:`Queue`): Queue for the updates. + update_queue (:class:`queue.Queue`): Queue for the updates. dispatcher (:class:`telegram.ext.Dispatcher`): Optional. Dispatcher that handles the updates and dispatches them to the handlers. running (:obj:`bool`): Indicates if the updater is running. @@ -188,7 +188,7 @@ class Updater(Generic[BT, DT]): """Starts polling updates from Telegram. .. versionchanged:: 14.0 - Removed the ``clean`` argument in favor of ``drop_pending_updates``. + Removed the ``clean`` argument in favor of :paramref:`drop_pending_updates`. Args: poll_interval (:obj:`float`, optional): Time to wait between polling updates from @@ -212,7 +212,7 @@ class Updater(Generic[BT, DT]): timeout from server (Default: ``2``). Returns: - :obj:`Queue`: The update queue that can be filled from the main thread. + :class:`queue.Queue`: The update queue that can be filled from the main thread. """ with self.__lock: @@ -262,8 +262,8 @@ class Updater(Generic[BT, DT]): max_connections: int = 40, ) -> Optional[Queue]: """ - Starts a small http server to listen for updates via webhook. If :attr:`cert` - and :attr:`key` are not provided, the webhook will be started directly on + Starts a small http server to listen for updates via webhook. If :paramref:`cert` + and :paramref:`key` are not provided, the webhook will be started directly on http://listen:port/url_path, so SSL can be handled by another application. Else, the webhook will be started on https://listen:port/url_path. Also calls :meth:`telegram.Bot.set_webhook` as required. @@ -273,8 +273,8 @@ class Updater(Generic[BT, DT]): ``webhook_url`` instead of calling ``updater.bot.set_webhook(webhook_url)`` manually. .. versionchanged:: 14.0 - Removed the ``clean`` argument in favor of ``drop_pending_updates`` and removed the - deprecated argument ``force_event_loop``. + Removed the ``clean`` argument in favor of :paramref:`drop_pending_updates` and removed + the deprecated argument ``force_event_loop``. Args: listen (:obj:`str`, optional): IP-Address to listen on. Default ``127.0.0.1``. @@ -308,7 +308,7 @@ class Updater(Generic[BT, DT]): .. versionadded:: 13.6 Returns: - :obj:`Queue`: The update queue that can be filled from the main thread. + :class:`queue.Queue`: The update queue that can be filled from the main thread. """ with self.__lock: diff --git a/telegram/ext/_utils/types.py b/telegram/ext/_utils/types.py index 105091d76..51037e5b0 100644 --- a/telegram/ext/_utils/types.py +++ b/telegram/ext/_utils/types.py @@ -40,7 +40,7 @@ ConversationDict = Dict[Tuple[int, ...], Optional[object]] """ CDCData = Tuple[List[Tuple[str, float, Dict[str, Any]]], Dict[str, str]] -"""Tuple[List[Tuple[:obj:`str`, :obj:`float`, Dict[:obj:`str`, :obj:`Any`]]], \ +"""Tuple[List[Tuple[:obj:`str`, :obj:`float`, Dict[:obj:`str`, :class:`object`]]], \ Dict[:obj:`str`, :obj:`str`]]: Data returned by :attr:`telegram.ext.CallbackDataCache.persistence_data`. diff --git a/telegram/ext/filters.py b/telegram/ext/filters.py index 0d0344794..842b412e6 100644 --- a/telegram/ext/filters.py +++ b/telegram/ext/filters.py @@ -25,7 +25,7 @@ This module contains filters for use with :class:`telegram.ext.MessageHandler`, #. Filters are no longer callable, if you're using a custom filter and are calling an existing filter, then switch to the new syntax: ``filters.{filter}.check_update(update)``. #. Removed the ``Filters`` class. The filters are now directly attributes/classes of the - :mod:`filters` module. + :mod:`~telegram.ext.filters` module. #. The names of all filters has been updated: * Filter classes which are ready for use, e.g ``Filters.all`` are now capitalized, e.g @@ -561,7 +561,7 @@ class CaptionRegex(MessageFilter): This filter will not work on simple text messages, but only on media with caption. Args: - pattern (:obj:`str` | :obj:`re.Pattern`): The regex pattern. + pattern (:obj:`str` | :func:`re.Pattern `): The regex pattern. """ __slots__ = ('pattern',) @@ -1320,8 +1320,8 @@ class ForwardedFrom(_ChatUserBaseFilter): Note: When a user has disallowed adding a link to their account while forwarding their messages, this filter will *not* work since both - :attr:`telegram.Message.forwarded_from` and - :attr:`telegram.Message.forwarded_from_chat` are :obj:`None`. However, this behaviour + :attr:`telegram.Message.forward_from` and + :attr:`telegram.Message.forward_from_chat` are :obj:`None`. However, this behaviour is undocumented and might be changed by Telegram. Warning: @@ -1393,7 +1393,7 @@ class _HasProtectedContent(MessageFilter): return bool(message.has_protected_content) -HAS_PROTECTED_CONTENT = _HasProtectedContent(name='Filters.has_protected_content') +HAS_PROTECTED_CONTENT = _HasProtectedContent(name='filters.HAS_PROTECTED_CONTENT') """Messages that contain :attr:`telegram.Message.has_protected_content`. .. versionadded:: 13.9 @@ -1418,7 +1418,7 @@ class _IsAutomaticForward(MessageFilter): return bool(message.is_automatic_forward) -IS_AUTOMATIC_FORWARD = _IsAutomaticForward(name='Filters.is_automatic_forward') +IS_AUTOMATIC_FORWARD = _IsAutomaticForward(name='filters.IS_AUTOMATIC_FORWARD') """Messages that contain :attr:`telegram.Message.is_automatic_forward`. .. versionadded:: 13.9 @@ -1509,7 +1509,7 @@ POLL = _Poll(name="filters.POLL") class Regex(MessageFilter): """ Filters updates by searching for an occurrence of ``pattern`` in the message text. - The :obj:`re.search()` function is used to determine whether an update should be filtered. + The :func:`re.search` function is used to determine whether an update should be filtered. Refer to the documentation of the :obj:`re` module for more information. @@ -1532,7 +1532,7 @@ class Regex(MessageFilter): first filter, since the second one is never evaluated. Args: - pattern (:obj:`str` | :obj:`re.Pattern`): The regex pattern. + pattern (:obj:`str` | :func:`re.Pattern `): The regex pattern. """ __slots__ = ('pattern',) @@ -1593,7 +1593,7 @@ class SenderChat(_ChatUserBaseFilter): group). Since v13.9, the field :attr:`telegram.Message.is_automatic_forward` will be :obj:`True` for the discussion group message. - .. seealso:: :attr:`telegram.ext.filters.IS_AUTOMATIC_FORWARD` + .. seealso:: :attr:`telegram.ext.filters.IS_AUTOMATIC_FORWARD` Warning: :attr:`chat_ids` will return a *copy* of the saved chat ids as :obj:`frozenset`. This diff --git a/telegram/request.py b/telegram/request.py index 20cc485d5..1c9e406bd 100644 --- a/telegram/request.py +++ b/telegram/request.py @@ -107,7 +107,7 @@ class Request: con_pool_size (:obj:`int`): Number of connections to keep in the connection pool. proxy_url (:obj:`str`): The URL to the proxy server. For example: `http://127.0.0.1:3128`. urllib3_proxy_kwargs (:obj:`dict`): Arbitrary arguments passed as-is to - :obj:`urllib3.ProxyManager`. This value will be ignored if :attr:`proxy_url` is not + ``urllib3.ProxyManager``. This value will be ignored if :paramref:`proxy_url` is not set. connect_timeout (:obj:`int` | :obj:`float`): The maximum amount of time (in seconds) to wait for a connection attempt to a server to succeed. :obj:`None` will set an