Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: python-telegram-bot/python-telegram-bot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: nemacysts/python-telegram-bot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Dec 4, 2024

  1. Widen specified type for allowed_updates Application/Updater parameter

    This parameter has been inconsistently typed as either list[str] or
    tuple[str] - as either is acceptable, we can widen the type to
    Sequence[str] to satisfy `mypy` and/or other type checkers.
    
    This will allow for constructs like:
    ```Python
    application.run_polling(
        allowed_updates=(
            UpdateType.MESSAGE,
            UpdateType.EDITED_MESSAGE,
        )
    )
    ```
    which currently fails mypy (and likely other typecheckers) with an error
    like:
    `error: Argument "allowed_updates" to "run_polling" of "Application" hasincompatible type "tuple[UpdateType, UpdateType]"; expected "list[str] | None"  [arg-type]`
    nemacysts committed Dec 4, 2024
    Configuration menu
    Copy the full SHA
    0541ed0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0a0d4c4 View commit details
    Browse the repository at this point in the history
Loading