-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc: miscellaneous linting wrt Pylance #3262
Conversation
type(cls), # pyright: ignore[reportUnknownArgumentType] | ||
cls.__name__, | ||
(cls,), # pyright: ignore[reportUnknownArgumentType] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these ignores are only needed for our pyright, the new one is happy with this, I'll do a pass to remove them with the automated "unnecessary ignores as errors" option
def verify(self) -> None: | ||
for idx, val in enumerate(self.data): | ||
if not isinstance(val, Attribute): | ||
raise VerifyException( | ||
f"{self.name} data expects attribute list, but element " | ||
f"{idx} is of type {type(val)}." | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type system already enforces this, surely we don't need to check this again? Pylance now complains
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3262 +/- ##
==========================================
+ Coverage 89.92% 89.93% +0.01%
==========================================
Files 442 442
Lines 55490 55480 -10
Branches 8656 8651 -5
==========================================
- Hits 49899 49897 -2
+ Misses 4161 4157 -4
+ Partials 1430 1426 -4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Another small step towards updating Pyright, contains small changes that both our current Pyright and the new one are happy with. Pylance errors: 109 -> 94