refactor: type(x).__name__ => x.__class__.__name__#1466
refactor: type(x).__name__ => x.__class__.__name__#1466Enegg wants to merge 2 commits intoDisnakeDev:masterfrom
type(x).__name__ => x.__class__.__name__#1466Conversation
|
There's a risk to this as I'm not sure unification of these is necessary in one big go, but we should probably standardize on a specific type for future code. |
|
The PR could go the other way and replace |
|
Summary
This PR unifies the style of access to a value's type's name, replacing
type(x).__name__withx.__class__.__name__(since the latter has been used more often)Also moves a type guard at disnake/ext/tasks/init.py#L125-L127 higher up, so it can fail quicker.
Checklist
uv run nox -s lintuv run nox -s pyright