style: enable more pyright rules
[!NOTE] DO NOT REVIEW THIS. This is very much WIP. Will remove this note when ready to be reviewed.
Summary
Add in reportInconsistentOverload and reportInvalidTypeVarUse pyright rules
Closes #1440
Was actually pretty quick to put this together. So it wasn't wasted work, even if you disagree with this PR.
But as stated in the issue; these overloads were not doing anything anyway. The generic should be provided in the class instead of left as an Unknown. And maybe I am misunderstanding the code. If so, please let me know why this change is wrong.
Updated the docs files because nox was complaining about deprecated usage.
These changes should all be a noop.
Checklist
- [ ] If code changes were made, then they have been tested
- [ ] I have updated the documentation to reflect the changes
- [x] I have formatted the code properly by running
uv run nox -s lint - [x] I have type-checked the code by running
uv run nox -s pyright
- [x] This PR fixes an issue
- [ ] This PR adds something new (e.g. new method or parameters)
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [ ] This PR is not a code change (e.g. documentation, README, ...)
Documentation build overview
📚 disnake | 🛠️ Build #29999995 | 📁 Comparing 7ef84940aceafb8724309e0fdc7030c163d727fb against latest (d9b77a78de1ace6bc38db6f6b04f2358ca952418)
Show files changed (48 files in total): 📝 48 modified | ➕ 0 added | ➖ 0 deleted
@Enegg thank you for taking a look! Yea, I know a lot of things here are shifted around. This PR is not ready to be looked at anymore. Yes, there are a bunch of incorrect things in here. Will get to patching things up as they come up.
To be able to properly resolve some of the type errors, I need to resolve a bunch of Unknown situations too. So it is taking a bit of time and being a bit more complicated. Might need to lump this change in with a bigger Unknwon push. Will report back later.
Going to wait for #1449 before I work on this more.
Also, after talking with @onerandomusername, I am going to move typing_extensions outside TYPE_CHECKING for TypeVar so we can consume the default in a much simpler way.