Problem
There are currently two Snowflake definitions:
abc.Snowflake - The protocol/ABC for snowflake objects
types.Snowflake - Not even a model, just a type alias
This creates confusion throughout the library, with the incorrect one being used multiple times. This is likely due to people using auto imports and accidentally importing the wrong one.
Proposed Solution
Remove types.Snowflake entirely and just use int | str directly where a snowflake ID type is needed. This:
- Uses fewer characters
- Eliminates confusion between
abc.Snowflake and types.Snowflake
- Makes it clearer when we're talking about an ID vs a snowflake object
Context
This issue was identified during next refactor planning discussions.
Reference: https://canary.discord.com/channels/881207955029110855/1401527338470084819/1440705381901799504
Problem
There are currently two
Snowflakedefinitions:abc.Snowflake- The protocol/ABC for snowflake objectstypes.Snowflake- Not even a model, just a type aliasThis creates confusion throughout the library, with the incorrect one being used multiple times. This is likely due to people using auto imports and accidentally importing the wrong one.
Proposed Solution
Remove
types.Snowflakeentirely and just useint | strdirectly where a snowflake ID type is needed. This:abc.Snowflakeandtypes.SnowflakeContext
This issue was identified during next refactor planning discussions.
Reference: https://canary.discord.com/channels/881207955029110855/1401527338470084819/1440705381901799504