#Why is unioning bridge.BridgeExtContext and bridge.BridgeApplicationContext not allowed?

1 messages · Page 1 of 1 (latest)

thorn halo
#

So I recently updated the library to the latest commit with the new type checking stuff and It flagged out a few things including the usage of ctx: Union[bridge.BridgeExtContext, bridge.BridgeApplicationContext]. I only do this because specifying ctx: BridgeContext causes type warnings in my IDE (Pycharm) when I use stuff like ctx.guild and ctx.bot. Is there a reason why? and is there an alternative type to specify, and if, its bridge.BridgeContext can you please fix it to contain all the commonly shared attributes between bridge.BridgeExtContext and bridge.BridgeApplicationContext?

river pollen
#

I had the same issues with it

thorn halo
thorn halo
#

and it doesn't work

#

it still triggers the TypeError