refactor: type(x).__name__ => x.__class__.__name__#1466
Conversation
|
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 |
|
|
Would you mind updating this PR and resolving merge conflicts? ty c: |
30d1a0c to
13da86d
Compare
Co-authored-by: vi <8530778+shiftinv@users.noreply.github.com> Signed-off-by: Eneg <42005170+Enegg@users.noreply.github.com>
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