forked from Pycord-Development/pycord
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Milestone
Description
Problem
There are currently two Snowflake definitions:
abc.Snowflake- The protocol/ABC for snowflake objectstypes.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.Snowflakeandtypes.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