Skip to content
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 14 commits into from Apr 6, 2024
Merged

Conversation

bluetech
Copy link
Member

@bluetech bluetech commented Apr 5, 2024

These are some commits I made while adding typing to the plugin (will send a PR after this one is merged).

Copy link
Member

@nicoddemus nicoddemus left a 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.
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 bluetech merged commit 4720808 into pytest-dev:master Apr 6, 2024
21 checks passed
@bluetech bluetech deleted the pre-typing-fixes branch April 6, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants