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

Remove ENV_PATH on Black action completion. #3759

Merged
merged 5 commits into from
Aug 8, 2023
Merged

Conversation

cjproud
Copy link
Contributor

@cjproud cjproud commented Jul 3, 2023

Description

Relates to #3708 by deleting the .black.env folder specified by ENV_PATH on action completion.

I had a difficult time replicating the issue above @JelleZijlstra and I can't see that any changes were made to stable that would effect this behaviour. Probably worth deleting that .black.env dir anyway?

Checklist - did you ...

  • Add an entry in CHANGES.md if necessary?
  • Add / update tests if necessary?
  • Add new / update outdated documentation?

Copy link
Collaborator

@ichard26 ichard26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not sure how this would cause issues, but this is a good idea either way. Thanks for filing the PR!

Please add a changelog entry though.

action/main.py Outdated
@@ -73,5 +74,6 @@
stderr=STDOUT,
encoding="utf-8",
)
shutil.rmtree(ENV_PATH)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth passing ignore_errors=True to this call? An error is unlikely, but it also shouldn't fail the entire action IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I think an error is unlikely but yeah shouldn't fail the entire action.

@ichard26
Copy link
Collaborator

Don't mind the PyPy failures, it seems like a recent PyYAML release broke things on PyPy... :/

@cjproud
Copy link
Contributor Author

cjproud commented Jul 19, 2023

@ichard26 I've added a changelog entry and the ignore_errors=True flag to the shutil.rmtree function 👍

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks like another user confirmed the fix as well!

@hauntsaninja hauntsaninja merged commit c36e468 into psf:main Aug 8, 2023
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: integrations Editor plugins and other integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants