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

use open() as context manager #9579

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

russoz
Copy link
Collaborator

@russoz russoz commented Jan 16, 2025

SUMMARY

Use open as a context manager, as a good practice.

ISSUE TYPE
  • Refactoring Pull Request
COMPONENT NAME

plugins/module_utils/known_hosts.py
plugins/modules/cloud_init_data_facts.py
plugins/modules/cronvar.py
plugins/modules/crypttab.py
plugins/modules/parted.py
plugins/modules/pulp_repo.py
plugins/modules/redhat_subscription.py
plugins/modules/solaris_zone.py
plugins/modules/sorcery.py
plugins/modules/timezone.py
tests/unit/plugins/inventory/test_iocage.py
tests/unit/plugins/modules/test_wdc_redfish_command.py

@ansibullbot ansibullbot added module module module_utils module_utils plugins plugin (any type) redhat_subscription tests tests unit tests/unit labels Jan 16, 2025
@ptoscano
Copy link
Contributor

The changes in redhat_subscription.py LGTM, thanks.

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-10 Automatically create a backport for the stable-10 branch labels Jan 18, 2025
plugins/module_utils/known_hosts.py Show resolved Hide resolved
plugins/modules/timezone.py Show resolved Hide resolved
@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jan 21, 2025
@felixfontein felixfontein merged commit 0de39a6 into ansible-collections:main Jan 21, 2025
138 checks passed
Copy link

patchback bot commented Jan 21, 2025

Backport to stable-10: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-10/0de39a6f47e4ee7beeaa7bf2819927cf7aeecfec/pr-9579

Backported as #9596

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 21, 2025
* use open() as context manager

* add changelog frag

(cherry picked from commit 0de39a6)
@felixfontein
Copy link
Collaborator

@russoz thanks for your contribution!
@ptoscano thanks for reviewing!

felixfontein pushed a commit that referenced this pull request Jan 21, 2025
…#9596)

use open() as context manager (#9579)

* use open() as context manager

* add changelog frag

(cherry picked from commit 0de39a6)

Co-authored-by: Alexei Znamensky <[email protected]>
@russoz russoz deleted the with-open branch January 21, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-10 Automatically create a backport for the stable-10 branch module_utils module_utils module module plugins plugin (any type) redhat_subscription tests tests unit tests/unit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants