mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
[PR #11043/3478863e backport][stable-12] Address issues reported by ruff check (#11047)
Address issues reported by ruff check (#11043)
* Resolve E713 and E714 (not in/is tests).
* Address UP018 (unnecessary str call).
* UP045 requires Python 3.10+.
* Address UP007 (X | Y for type annotations).
* Address UP035 (import Callable from collections.abc).
* Address UP006 (t.Dict -> dict).
* Address UP009 (UTF-8 encoding comment).
* Address UP034 (extraneous parantheses).
* Address SIM910 (dict.get() with None default).
* Address F401 (unused import).
* Address UP020 (use builtin open).
* Address B009 and B010 (getattr/setattr with constant name).
* Address SIM300 (Yoda conditions).
* UP029 isn't in use anyway.
* Address FLY002 (static join).
* Address B034 (re.sub positional args).
* Address B020 (loop variable overrides input).
* Address B017 (assert raise Exception).
* Address SIM211 (if expression with false/true).
* Address SIM113 (enumerate for loop).
* Address UP036 (sys.version_info checks).
* Remove unnecessary UP039.
* Address SIM201 (not ==).
* Address SIM212 (if expr with twisted arms).
* Add changelog fragment.
* Reformat.
(cherry picked from commit 3478863ef0)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
64
changelogs/fragments/11043-ruff-check.yml
Normal file
64
changelogs/fragments/11043-ruff-check.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
bugfixes:
|
||||
- timestamp callback plugin - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- wsl connection plugin - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- json_patch filter plugin - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- to_* time filter plugins - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- linode inventory plugin - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- _filelock module utils - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- btrfs module utils - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- module_helper module utils - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- oneandone module utils - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- opennebula module utils - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- ali_instance - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- ali_instance_info - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- apt_rpm - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- btrfs_subvolume - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- consul - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- cronvar - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- dnf_versionlock - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- dnsmadeeasy - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- gitlab_issue - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- gitlab_merge_request - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- gitlab_project - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- gitlab_user - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- haproxy - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- homebrew - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- homebrew_services - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- hpilo_boot - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- ini_file - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- ipa_otptoken - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- jenkins_credential - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- jenkins_plugin - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- kea_command - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- keycloak_authz_permission - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- keycloak_clientscope_type - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- keycloak_user_execute_actions_email - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- keycloak_user_federation - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- listen_ports_facts - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- lxc_container - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- lxd_container - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- matrix - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- maven_artifact - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- monit - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- netcup_dns - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- nmcli - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- nomad_job - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- npm - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- one_host - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- one_image - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- one_template - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- one_vm - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- one_vnet - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- onepassword_info - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- pamd - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- pkgin - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- pulp_repo - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- redhat_subscription - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- rhevm - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- sensu_check - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- simpleinit_msb - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- sorcery - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- terraform - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- timezone - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- xenserver_guest - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
- zypper_repository - improve Python code (https://github.com/ansible-collections/community.general/pull/11043).
|
||||
Reference in New Issue
Block a user