adampy / adambot

General-purpose discord bot, called Adam-Bot. The main bot instance is hosted on AWS EC2 Spot Instances, however can run locally when needed.
6 stars 6 forks source link

Change type hints of X | None to Optional[X] #41

Closed itzmk21 closed 2 years ago

itzmk21 commented 2 years ago

And added the forgotten return type annotation to setup Role cog

From the docs

Optional[X] is equivalent to X | None (or Union[X, None]).

Totally up to you tbh lol, Optional I guess adds readability?

The return type of setup() in all cogs were annotated as -> None but one was missing which was why it was added for consistency.