-
Notifications
You must be signed in to change notification settings - Fork 232
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
Pre-typing fixes/improvements #1060
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nicoddemus
approved these changes
Apr 6, 2024
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.
Reviewed each commit individually, looks great, thanks!
The assert as written was always true, according to the name `failures` it intended the first element of the tuple.
self.config can't be None.
This code is bogus copy/paste; presumably it's not executed in practice so make it raise `NotImplementedError`.
`time()` is not monotonic and is not appropriate for measuring duration.
It's not used.
Since d153e0a the remote doesn't send events for this hook at all (I think perhaps wrongly, but it's history by now), so no point in handling it in the coordinator side.
These days dicts are guaranteed to be ordered, so no need to use OrderedDict in two of the three cases (the remaining case needs `popitem(last=False)`).
Enum has a unique type, unlike `object()`, enabling better typing.
Allows us to use more modern typing.
py is no longer used. psutil is used optionally so add its typing.
Seems like it intends to check all schedulers.
bluetech
force-pushed
the
pre-typing-fixes
branch
from
April 6, 2024 19:13
bc74766
to
cdff86a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are some commits I made while adding typing to the plugin (will send a PR after this one is merged).