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

Fix unclosed file warning #1217

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

alicederyn
Copy link
Collaborator

Pull Request Checklist

Description of PR
Currently, get_annotated_artifact_value is opening a file but not closing it, resulting in a ResourceWarning in the __del__ method.

This PR just adds a with block to ensure safe cleanup.

get_annotated_artifact_value was opening a file but not closing it, resulting in a ResourceWarning. Use `with` to ensure safe cleanup.

Signed-off-by: Alice Purcell <alicederyn@gmail.com>
@alicederyn alicederyn added semver:patch A change requiring a patch version bump type:bug A general bug labels Sep 30, 2024
@elliotgunton elliotgunton enabled auto-merge (squash) September 30, 2024 10:25
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.0%. Comparing base (d553546) to head (f249969).
Report is 158 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1217     +/-   ##
=======================================
+ Coverage   81.7%   86.0%   +4.2%     
=======================================
  Files         54      60      +6     
  Lines       4208    4041    -167     
  Branches     889     841     -48     
=======================================
+ Hits        3439    3476     +37     
+ Misses       574     392    -182     
+ Partials     195     173     -22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elliotgunton elliotgunton merged commit d75a1b3 into argoproj-labs:main Sep 30, 2024
22 checks passed
@alicederyn alicederyn deleted the resource.warning branch September 30, 2024 11:57
@elliotgunton elliotgunton added type:task A general task and removed type:bug A general bug labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants