Felix Fontein
3791c55bdc
Python 3.11 and earlier apparently do not like multi-line f-strings.
2025-10-11 22:29:38 +02:00
Felix Fontein
5bab9a41d3
Make consider-using-f-string changes compatible with older Python versions.
2025-10-11 22:18:37 +02:00
Felix Fontein
b49031ff19
Remove broken dead code.
2025-10-11 15:35:53 +02:00
Felix Fontein
f9cd56a985
Address no-else-return.
2025-10-11 15:30:33 +02:00
Felix Fontein
e3b07ed6b2
Address no-else-raise.
2025-10-11 15:30:15 +02:00
Felix Fontein
73a0bf93d2
Address no-else-continue.
2025-10-11 15:30:15 +02:00
Felix Fontein
d04a770441
Address keyword-arg-before-vararg.
2025-10-11 15:30:15 +02:00
Felix Fontein
ae0dba8490
Address invalid-name.
2025-10-11 15:30:15 +02:00
Felix Fontein
c7399b7c38
Address some consider-using-with.
2025-10-11 15:30:15 +02:00
Felix Fontein
9bb3f8c3b3
Address consider-using-max-builtin.
2025-10-11 15:30:15 +02:00
Felix Fontein
da788d3669
Address consider-using-in.
2025-10-11 15:30:15 +02:00
Felix Fontein
6d97fca880
Address consider-using-f-string.
2025-10-11 15:30:15 +02:00
Felix Fontein
8acdc3c851
Address consider-using-dict-comprehension.
2025-10-11 15:30:15 +02:00
Felix Fontein
ae53065001
Address consider-iterating-dictionary.
2025-10-11 15:30:15 +02:00
Felix Fontein
1d30856e67
Address broad-exception-caught.
2025-10-11 15:30:15 +02:00
Felix Fontein
451e235c2a
Address broad-exception-raised.
2025-10-11 15:30:15 +02:00
Felix Fontein
0fa1dacbbd
Address attribute-defined-outside-init.
2025-10-11 15:30:15 +02:00
Felix Fontein
33c8a49191
Fix crashes due to wrong names. ( #1161 )
2025-10-11 15:29:14 +02:00
Felix Fontein
892e9d9cbd
Reorganize imports due to https://github.com/ansible-community/antsibull-nox/pull/136 .
2025-10-10 21:19:28 +02:00
Felix Fontein
f7e976f3da
Avoid losing data from events if multiple arrive at the same time. ( #1158 )
2025-10-10 20:21:21 +02:00
Felix Fontein
e8ec22d3b1
Python code modernization, 3/n ( #1157 )
...
* Remove __metaclass__ = type.
for i in $(grep -REl '__metaclass__ = type' plugins/ tests/); do
sed -e '/^__metaclass__ = type/d' -i $i;
done
* Remove super arguments, and stop inheriting from object.
2025-10-10 08:11:58 +02:00
Felix Fontein
741c318b1d
Python code modernization, 2/n ( #1156 )
...
* 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
* Reformat.
2025-10-09 20:46:48 +02:00
Felix Fontein
a3efa26e2e
Address some pylint issues ( #1155 )
...
* Address cyclic-import.
* Address redefined-builtin.
* Address redefined-argument-from-local.
* Address many redefined-outer-name.
* Address pointless-string-statement.
* No longer needed due to separate bugfix.
* Address useless-return.
* Address possibly-used-before-assignment.
* Add TODOs.
* Address super-init-not-called.
* Address function-redefined.
* Address unspecified-encoding.
* Clean up more imports.
2025-10-09 20:11:36 +02:00
Felix Fontein
db09affaea
Fix isort config.
2025-10-07 23:00:42 +02:00
Felix Fontein
ec5f7682a1
Prevent loss of data. ( #1152 )
2025-10-07 22:05:05 +02:00
Felix Fontein
acf18f0ade
Add more CI checks ( #1150 )
...
* Enable mypy.
* Add flake8.
* Add pylint with a long list of ignores to be removed.
2025-10-07 19:37:16 +02:00
Felix Fontein
449b37e1c9
Fix docker_container_exec's detach=true. ( #1145 )
2025-10-07 18:49:20 +02:00
Felix Fontein
54c2e49fdf
Fix diff for plugin options. ( #1146 )
2025-10-07 18:31:27 +02:00
salty
ebb8569b5f
docker_container: add driver_opts and gw_priority ( #1143 )
...
closes #1142
2025-10-07 18:26:25 +02:00
Felix Fontein
117271579e
Make all doc fragments, module utils, and plugin utils private ( #1144 )
...
* Make all doc fragments, module utils, and plugin utils private.
* Remove some unused and no longer needed imports.
This hopefully also fixes the CI issues, which do not happen locally for me...
* Fix formatting.
* Try to make CI happy, again.
* Fix imports.
* Lint.
2025-10-07 07:32:33 +02:00
Felix Fontein
bb39e67c8f
Make CI pass; add black and isort to CI; add reformat commit to .git-blame-ignore-revs.
2025-10-06 18:57:33 +02:00
Felix Fontein
d65d37e9e9
Reformat code with black and isort.
2025-10-06 18:34:59 +02:00
Felix Fontein
f45232635c
Python code modernization, 1/n ( #1141 )
...
* Remove unicode text prefixes.
* Replace str.format() uses with f-strings.
* Replace % with f-strings, and do some cleanup.
* Fix wrong variable.
* Avoid unnecessary string conversion.
2025-10-06 18:30:54 +02:00
Felix Fontein
1f2817fa20
Prepare 5.0.0 ( #1123 )
...
* Bump version to 5.0.0-a1.
* Drop support for ansible-core 2.15 and 2.16.
* Remove Python 2 and early Python 3 compatibility.
2025-10-05 20:22:50 +02:00
Felix Fontein
251e4eca49
Remove remaining usages of ansible.module_utils.six. ( #1140 )
2025-10-05 16:17:50 +02:00
Felix Fontein
ebe42308cc
Replace ansible.module_utils.six with own module utils in some cases ( #1138 )
...
* Replace ansible.module_utils.six with own module utils in some cases.
* Add ignore.txt entires.
2025-10-04 23:45:27 +02:00
Felix Fontein
82b49c7cf2
Fix wrong replacements. ( #1139 )
2025-10-04 23:18:11 +02:00
Felix Fontein
1902e0fdf2
Avoid six in plugin code. ( #1137 )
2025-10-04 21:51:59 +02:00
Felix Fontein
fd011d3871
Support missing fields and missing types in mounts. ( #1134 )
2025-09-29 22:35:07 +02:00
Laurent Commarieu
ba58752646
Rename login_results to login_result in docker_login docstring ( #1121 )
2025-08-26 21:48:57 +02:00
Felix Fontein
68ac6fecb1
Avoid deprecated functionality. ( #1117 )
2025-08-17 20:15:40 +02:00
Felix Fontein
e1920d1cc7
Work around bug in Docker 28.3.3 that prevents pushing to registry without authentication. ( #1110 )
2025-08-03 15:19:16 +02:00
tpourcelot
449448e820
docker_swarm_service: add support for replicated jobs ( #1108 )
...
* feat(docker_swarm_service): Add support for replicated jobs
* chore(docker_swarm_plugin): Fixes after review
* chore(docker_swarm_service): Add a check for minimum version
* chore(docker_swarm_service): Add changelog fragment for #1108
* fix(docker_swarm_service): Fix typo in version check
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Tristan Pourcelot <tristan.pourcelot@exatrack.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-08-03 13:12:29 +02:00
Felix Fontein
ac301beebd
Adjust to Compose 2.39.0+. ( #1101 )
2025-07-25 21:59:41 +02:00
Felix Fontein
e9f4553b01
docker_container idempotency: work around Docker not returning true configured command when command is [] ( #1085 )
...
* Work around Docker not returning true configured command when command is [].
* Lint.
* Add test.
* Add changelog fragment.
2025-06-08 19:05:09 +02:00
Felix Fontein
8ecbd9a5cc
docker_compose_v2: work around bug in docker compose images --format json ( #1083 )
...
* Work around ubg in docker compose images --format json.
* ContainerName is no longer in image record.
2025-06-07 23:28:51 +02:00
Felix Fontein
cdf02b642c
Lint doc fragments.
2025-05-01 16:46:13 +02:00
Felix Fontein
ad989c1942
docker_container_copy_into: add mode_parse option ( #1074 )
...
* Add mode_parse option.
* Make yamllint config strict.
* Lint.
2025-04-28 20:46:11 +02:00
Felix Fontein
2487d1a0bf
Fix linting errors.
2025-04-26 12:39:00 +02:00
Felix Fontein
3a3ece3ba5
Warn about octal modes. ( #1072 )
2025-04-26 12:22:16 +02:00