GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix `GameHighScore` return in admonition · Issue #4414 · python-telegram-bot/python-telegram-bot

Fix GameHighScore return in admonition #4414

New issue
Copy link
New issue
Copy link
Closed
🐛 bug
#4462
Closed
Fix GameHighScore return in admonition#4414
🐛 bug
#4462
Copy link
Assignees
harshil21
Labels
⚙️ documentationaffected functionality: documentationaffected functionality: documentation
Milestone
v22.0

Description

@harshil21
harshil21
opened on Aug 3, 2024
Issue body actions

Steps to Reproduce

  1. Check the docs for gamehighscore
  2. No returned in admonition present

Expected behaviour

It should show Returned in Bot.get_game_high_scores.

I propose refactoring the code of AdmonitionInserter._resolve_arg, since that is why this fails. I am unsure why typing.get_origin is used instead typing.get_args. Moreover, we can let python resolve forward refs, as we've done recently in test_official, which should reduce complexity.

Actual behaviour

Nothing shown.

Operating System

Agnostic

Version of Python, python-telegram-bot & dependencies

python-telegram-bot 21.4 (v21.4-13-g356a58ffd)
Bot API 7.8
Python 3.13.0b1 (main, May 10 2024, 23:59:20) [GCC 13.2.0]

Relevant log output

No response

Additional Context

No response

Activity

  1. harshil21
    added
    bug 🐛
    ⚙️ documentationaffected functionality: documentationaffected functionality: documentation
    on Aug 3, 2024
  2. harshil21
    self-assigned this
    on Aug 3, 2024
  3. Bibo-Joshi commented on Sep 1, 2024

    @Bibo-Joshi
    Bibo-Joshi
    on Sep 1, 2024
    Member
    More actions

    Moreover, we can let python resolve forward refs, as we've done recently in test_official, which should reduce complexity.

    Are you referring to

    python-telegram-bot/tests/test_official/helpers.py

    Lines 108 to 111 in 8c692d1

    @functools.cache
    def resolve_forward_refs_in_type(obj: type) -> type:
    """Resolves forward references in a type hint."""
    return _eval_type(obj, localns=tg_objects, globalns=None)

    ? If so: I see that you're usign the protected function typing._eval_type. Is there a specific reason why you're not using a documented, public function here?

  4. harshil21 commented on Sep 1, 2024

    @harshil21
    harshil21
    on Sep 1, 2024
    MemberAuthor
    More actions

    I had already started work on this, and no I did not use that function, but typing.get_type_hints instead.

  5. Bibo-Joshi commented on Sep 1, 2024

    @Bibo-Joshi
    Bibo-Joshi
    on Sep 1, 2024
    Member
    More actions

    Ah, good to know, then I'll keep off :) Thanks for letting me know!
    Still wondering about _eval_type in test official, but that's a different track, then :)

  6. Bibo-Joshi
    removed
    bug 🐛
    on Nov 4, 2024
  7. Bibo-Joshi
    changed the title [-][BUG] Fix `GameHighScore` return in admonition[/-] [+]Fix `GameHighScore` return in admonition[/+] on Nov 8, 2024
  8. Bibo-Joshi
    added this to the v22.0 milestone on Nov 25, 2024
  9. Bibo-Joshi
    closed this as completedin #4462on Jan 31, 2025
  10. github-actions
    locked and limited conversation to collaborators on Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @harshil21
    harshil21

Labels

⚙️ documentationaffected functionality: documentationaffected functionality: documentation

Type

🐛 bug

Fields

Priority

None yet

Effort

None yet

Projects

No projects

    Milestone

    • v22.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.