Files
odfstudio/wizards/source/scriptforge/python
Jean-Pierre Ledure 3f34264bc6 ScriptForge - Upgrade python stub file
Concerned file:
  scriptforge.pyi
(python stub having no impact on script
execution, only on script edition with
advanced IDE's like PyCharm and VSCode).

Guided by
  https://typing.python.org/en/latest/guides/modernizing.html#generics-in-the-typing-module
Older typing features are superseded
by more modern alternatives,
which are recommended to use.

Applicable changes:
>= Python 3.9
  typing.Dict => dict
  typing.List => list - replaced by tuple
  typing.Tuple => tuple
  typing.Sequence => collections.abc.Sequence
                     replaced by tuple
>= Python 3.10
  typing.Optional => | None
  typing.Union => | (pipe operator)

This makes the source more readable
and, also, a bit shorter.

No impact on user scripts.
Documentation unchanged.

Change-Id: I856d01660c5c3e1c3f0a0c2cca756fa0cbfd9a4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190362
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
2025-08-29 15:54:45 +02:00
..