-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Apply pyupgrade fixes for Python 3.9+ syntax #8150
Apply pyupgrade fixes for Python 3.9+ syntax #8150
Conversation
43a4af4
to
d14d662
Compare
Hi @jamesobutler, thanks for the PR. |
It looks good to me, the errors popping up are a little weird and maybe something incompatible buried in Pytorch. |
0a2a24b
to
9b1d232
Compare
I've attempted to avoid the typing related changes, but yeah I'm not sure what is going here with the code not being able to handle the post-upgrade. |
c741d57
to
e87d3f8
Compare
Signed-off-by: James Butler <[email protected]>
Signed-off-by: James Butler <[email protected]>
This should have been included in Project-MONAI@104a360 when Python 3.7 support was dropped. Changes were automatically applied by running: pre_commit run --all-files Signed-off-by: James Butler <[email protected]>
b200633
to
1f8644d
Compare
I have rebased this branch against latest I don't generally like large file exclusions, but I've excluded some files from the pyupgrade pre-commit action and as a result monai tests have begun to pass again. This PR now represents an improvement and removal of the pyupgrade exceptions can come in the future along with more debugging. Maybe the issue will resolve itself upon dropping support for Python 3.9 and the typing support that was available in that version. |
Signed-off-by: James Butler <[email protected]>
This should have been included in Project-MONAI@14b086b when Python 3.8 support was dropped. Changes were automatically applied by running: pre_commit run --all-files Signed-off-by: James Butler <[email protected]>
Changes were automatically applied by running: python -m isort . Signed-off-by: James Butler <[email protected]>
1f8644d
to
0cfb3e8
Compare
/build |
@KumoLiu Should the GPU-quick-py3 still be a required status check for the protected https://github.com/Project-MONAI/MONAI/actions/runs/11500638643/workflow?pr=8150 |
Hi @jamesobutler, yes it's required and the workflow has been move to the blossom, so it is run in this pipeline: https://github.com/Project-MONAI/MONAI/actions/runs/11502209707. |
@KumoLiu I see that blossom-ci is a required status check, but it doesn't seem like GPU-quick-py3 should be set as a required status check for a PR. Enforcing all status checks to pass prior to integrating into a protected branch would require it to be constantly overruled by an admin enforcement since the rule isn't being respected. |
@jamesobutler, Thanks for pointing out, I just updated that part, seems it's out of the date. |
Description
Included is a commit here applying pyupgrade changes for Python 3.8+ syntax. This should have been included in 104a360 when Python 3.7 support was dropped.
Also included is a commit here apply pyupgrade changes for Python 3.9+ syntax. This should have been included in 14b086b when Python 3.8 support was dropped.
I've also run the pre-commit autoupdate command to use the latest versions of the various pre-commit hook repos. It appears that pre-commit.ci bot has not been doing this on the quarterly schedule as expected? It appears the last time it submitted the PR to update the pre-commit hook repos was back in #6286 from April 2023.
Types of changes