Felix Fontein
6ab8cc0d82
Improve JSON parsing error handling. ( #1221 )
2025-12-06 22:25:30 +01:00
Felix Fontein
ec14568b22
Work around Docker 29.0.0 bug. ( #1187 )
2025-11-12 19:21:55 +01:00
Felix Fontein
be000755fc
Python code modernization, 8/n ( #1179 )
...
* Use to_text instead of to_native.
* Remove no longer needed pylint ignores.
* Remove another pylint ignore.
* Remove no longer needed ignore.
* Address redefined-outer-name.
* Address consider-using-with.
2025-10-25 00:36:04 +00:00
Felix Fontein
6ad4bfcd40
Add typing information, 2/n ( #1178 )
...
* Add typing to Docker Stack modules. Clean modules up.
* Add typing to Docker Swarm modules.
* Add typing to unit tests.
* Add more typing.
* Add ignore.txt entries.
2025-10-25 01:16:04 +02:00
Felix Fontein
3350283bcc
Add typing information, 1/2 ( #1176 )
...
* Re-enable typing and improve config.
* Make mypy pass.
* Improve settings.
* First batch of types.
* Add more type hints.
* Fixes.
* Format.
* Fix split_port() without returning to previous type chaos.
* Continue with type hints (and ignores).
2025-10-23 07:05:42 +02:00
Felix Fontein
c75aa5dd64
Python code modernization, 5/n ( #1165 )
...
* Address raise-missing-from.
* Address simplifiable-if-expression.
* Address unnecessary-dunder-call.
* Address unnecessary-pass.
* Address use-list-literal.
* Address unused-variable.
* Address use-dict-literal.
2025-10-12 16:02:27 +02:00
Felix Fontein
cad22de628
Python code modernization, 4/n ( #1162 )
...
* Address attribute-defined-outside-init.
* Address broad-exception-raised.
* Address broad-exception-caught.
* Address consider-iterating-dictionary.
* Address consider-using-dict-comprehension.
* Address consider-using-f-string.
* Address consider-using-in.
* Address consider-using-max-builtin.
* Address some consider-using-with.
* Address invalid-name.
* Address keyword-arg-before-vararg.
* Address line-too-long.
* Address no-else-continue.
* Address no-else-raise.
* Address no-else-return.
* Remove broken dead code.
* Make consider-using-f-string changes compatible with older Python versions.
* Python 3.11 and earlier apparently do not like multi-line f-strings.
2025-10-11 23:06:50 +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
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
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
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
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