Skip to content

Review types of optional arguments in methods and classes  #3864

@harshil21

Description

@harshil21

There are certain parameters in our bot methods which optional with the default as DEFAULT_NONE (as specified by the Defaults class). The type hinting of such parameters is not consistent. For e.g.

disable_notification: DVInput[bool] = DEFAULT_NONE,

and
protect_content: ODVInput[bool] = DEFAULT_NONE,

both parameters accept bool, but one of them is type hinted to also accept None (ODV -> Optional DefaultValue). Here the type hint for protect_content should be corrected to DVInput imo.

We should look for other cases like this, and correct it in both the type hints and documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions