Skip to content

[FEATURE] Typings: switch to explicit optional types #3367

@Viicos

Description

@Viicos

What kind of feature are you missing? Where do you notice a shortcoming of PTB?

Since mypy 0.990, implicit optional types are disabled by default. Maybe it is a good time to switch to explicit optional types, if so I can work on this.

Future reference: https://github.com/hauntsaninja/no_implicit_optional

Describe the solution you'd like

Switch to explicit optional types (e.g. def foo(s: str | None = None))

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions