Felix Fontein
236b9c0e04
Sort imports with ruff check --fix ( #11400 )
...
Sort imports with ruff check --fix.
2026-01-09 07:40:58 +01:00
Alexei Znamensky
b67c94fc3f
fix ruff cases UP024,UP041 ( #11391 )
...
* fix ruff cases UP024,UP041
* add changelog frag
2026-01-06 17:29:44 +01:00
Alexei Znamensky
5b5f7e9e64
batch 1 - update Python idiom to 3.7 using pyupgrade ( #11341 )
...
* batch 1 - update Python idiom to 3.7 using pyupgrade
* add changelog frag
* add changelog frag
2025-12-30 16:15:24 +01:00
Alexei Znamensky
9a3e26ad98
fix ruff case SIM112 ( #11190 )
2025-11-23 08:37:12 +01:00
Alexei Znamensky
58bb1e7c04
fix ruff case B007 ( #11115 )
...
* fix ruff case B007
* rollback inventory/iocage
* re-do the fix in inventory/iocage
* add cases in tests/unit/plugins
* rollback plugins/module_utils/memset.py
* rollback extraneous changes in plugins/modules/xcc_redfish_command.py
* add changelog frag
2025-11-12 21:06:14 +01:00
Felix Fontein
2b4333a033
Use raise from in plugins ( #11095 )
...
* Use raise from.
* Add changelog fragment.
2025-11-12 20:34:26 +01:00
Felix Fontein
3478863ef0
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.
2025-11-08 17:05:21 +13:00
Felix Fontein
b471a4a90d
Fix typing failure in CI ( #11030 )
...
* Fix typing failure in CI.
* Add changelog fragment.
2025-11-05 21:49:32 +01:00
Felix Fontein
340ff8586d
Reformat everything.
2025-11-01 13:46:53 +01:00
Felix Fontein
74c2c804e5
Cleanup: use super() instead of super(__class__, self) ( #11016 )
...
* Address UP008: Use super() instead of super(__class__, self).
* Linting.
2025-10-30 20:17:26 +01:00
Felix Fontein
6088b0cff5
CI: add type checking ( #10997 )
...
* Set up type checking with mypy.
* Make mypy pass.
* Use list() instead of sorted().
2025-10-29 17:13:38 +00:00
Alexei Znamensky
07cfd6c4b4
update code to python3 ( #10903 )
...
* update code to python3
* add changelog frag
* rollback adjustment for plugins/lookup/lmdb_kv.py
* accept PR suggestion for plugins/module_utils/utm_utils.py
* accept PR suggestion for plugins/module_utils/vexata.py
* Apply suggestions from code review
* Update changelogs/fragments/10903-2to3.yml
* Update changelogs/fragments/10903-2to3.yml
2025-10-12 11:05:57 +02:00
Alexei Znamensky
3734f471c1
use f-strings ( #10899 )
...
* use f-strings
* add changelog frag
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-10-11 11:59:28 +02:00
Felix Fontein
8f8a0e1d7c
Fix __future__ imports, __metaclass__ = type, and remove explicit UTF-8 encoding statement for Python files ( #10886 )
...
* Adjust all __future__ imports:
for i in $(grep -REl "__future__.*absolute_import" plugins/ tests/); do
sed -e 's/from __future__ import .*/from __future__ import annotations/g' -i $i;
done
* Remove all UTF-8 encoding specifications for Python source files:
for i in $(grep -REl '[-][*]- coding: utf-8 -[*]-' plugins/ tests/); do
sed -e '/^# -\*- coding: utf-8 -\*-/d' -i $i;
done
* Remove __metaclass__ = type:
for i in $(grep -REl '__metaclass__ = type' plugins/ tests/); do
sed -e '/^__metaclass__ = type/d' -i $i;
done
2025-10-10 19:52:04 +02:00
Felix Fontein
d0b0aff5bc
wsl connection: import paramiko directly ( #10531 )
...
Import paramiko directly.
2025-08-01 10:54:26 +02:00
Alexei Znamensky
580ac1e30d
fix style in plugins ( #10302 )
...
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-07-02 01:15:50 +12:00
Alexei Znamensky
e37cd1a015
fix YAML docs in multiple plugins ( #10286 )
...
* fix YAML docs in multiple plugins
* pfexec: fix short description
* adjust callback plugins
* fix wsl connection
* fix filter plugins
* fix inventory plugins
* minor adjustments in diy, print_task, xen_orchestra
2025-06-24 06:23:46 +02:00
Alexei Znamensky
3ab7a898c6
replace concatenations with f-string in plugins ( #10285 )
...
* replace concatenations with f-string in plugins
* add changelog frag
2025-06-23 21:10:19 +02:00
Felix Fontein
d032de3b16
Adjust YAML in plugin docs ( #10234 )
...
* Adjust YAML in plugin docs.
* Update ignore.txt.
* Forgot two indents.
* adjust connection plugins
adjust filter plugins
adjust inventory plugins
adjust lookup plugins
* Re-add YAML document start.
---------
Co-authored-by: Alexei Znamensky <russoz@gmail.com>
2025-06-16 17:46:01 +02:00
Rui Lopes
96b493002c
add the wsl connection plugin ( #9795 )
...
* add the wsl connection plugin
* move the banner_timeout required paramiko version to its own line
* document the proxy_command required paramiko version
* document the timeout required paramiko version
* simplify the sending of the become_pass value
* add Connection.__init__ type hints
* add MyAddPolicy.missing_host_key type hints
* normalize the Connection._parse_proxy_command replacers dict values to the str type
* add the user_known_hosts_file option
* modify the private_key_file option type to path
2025-04-19 09:01:36 +02:00