1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

Improve Python code: address unused variables (#11049)

* Address F841 (unused variable).

* Reformat.

* Add changelog fragment.

* More cleanup.

* Remove trailing whitespace.

* Readd removed code as a comment with TODO.
This commit is contained in:
Felix Fontein 2025-11-09 08:14:35 +01:00 committed by GitHub
parent 0d8521c718
commit 396f467bbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
90 changed files with 232 additions and 235 deletions

View file

@ -437,7 +437,7 @@ def change_service_permissions(module, auth, service_id, permissions):
data = {"action": {"perform": "chmod", "params": {"octet": permissions}}}
try:
status_result = open_url(
open_url(
f"{auth.url}/service/{service_id!s}/action",
method="POST",
force_basic_auth=True,
@ -453,7 +453,7 @@ def change_service_owner(module, auth, service_id, owner_id):
data = {"action": {"perform": "chown", "params": {"owner_id": owner_id}}}
try:
status_result = open_url(
open_url(
f"{auth.url}/service/{service_id!s}/action",
method="POST",
force_basic_auth=True,
@ -469,7 +469,7 @@ def change_service_group(module, auth, service_id, group_id):
data = {"action": {"perform": "chgrp", "params": {"group_id": group_id}}}
try:
status_result = open_url(
open_url(
f"{auth.url}/service/{service_id!s}/action",
method="POST",
force_basic_auth=True,
@ -666,7 +666,7 @@ def delete_service(module, auth, service_id):
return service_info
try:
result = open_url(
open_url(
f"{auth.url}/service/{service_id!s}",
method="DELETE",
force_basic_auth=True,