harshil21 · GitHub

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.

Read the original on github.com ↗