Commits vergleichen

..

2 Commits

Autor SHA1 Nachricht Datum
Sebastian Tobie 8190ee94d3 fixed the empty options 2024-03-13 20:17:36 +01:00
Sebastian Tobie 2f36e69a73 fixed the documentation for dictionaries 2024-03-13 20:13:35 +01:00
10 geänderte Dateien mit 60 neuen und 17 gelöschten Zeilen

Datei anzeigen

@ -5,6 +5,23 @@ Sebastian.Base Release Notes
.. contents:: Topics .. contents:: Topics
v0.4.2
======
Minor Changes
-------------
- removed the empty options dict
v0.4.1
======
Minor Changes
-------------
- added an default Display to the module
- fixed the docification of dictionaries
v0.4.0 v0.4.0
====== ======

Datei anzeigen

@ -16,4 +16,4 @@ plugins:
strategy: {} strategy: {}
test: {} test: {}
vars: {} vars: {}
version: 0.4.0 version: 0.4.2

Datei anzeigen

@ -5,24 +5,43 @@ releases:
release_summary: change the module to an ansible module release_summary: change the module to an ansible module
fragments: fragments:
- base_release.yml - base_release.yml
release_date: "2024-02-11" release_date: '2024-02-11'
0.3.0: 0.3.0:
changes: changes:
release_summary: rewrote the Types helper release_summary: rewrote the Types helper
fragments: fragments:
- types.yml - types.yml
release_date: "2024-02-24" release_date: '2024-02-24'
0.3.1: 0.3.1:
changes: changes:
release_summary: removed forgotten print calls release_summary: removed forgotten print calls
fragments: fragments:
- print_calls.yml - print_calls.yml
release_date: "2024-02-24" release_date: '2024-02-24'
0.4.0: 0.4.0:
release_date: "2024-03-08"
changes: changes:
release_summary: | release_summary: 'to prevent empty sections, the install and header methods
to prevent empty sections, the install and header methods return None if the method would just the scetion return None if the method would just the scetion
header header
'
fragments: fragments:
- sectioning.yml - sectioning.yml
release_date: '2024-03-08'
0.4.1:
changes:
minor_changes:
- added an default Display to the module
- fixed the docification of dictionaries
fragments:
- display.yml
- options_fix.yml
release_date: '2024-03-13'
0.4.2:
changes:
minor_changes:
- removed the empty options dict
fragments:
- empty_options.yml
release_date: '2024-03-13'

Datei anzeigen

@ -1,2 +1,3 @@
--- ---
release_summary: added an default Display to the module minor_changes:
- added an default Display to the module

Datei anzeigen

@ -0,0 +1,3 @@
---
minor_changes:
- removed the empty options dict

Datei anzeigen

@ -0,0 +1,3 @@
---
minor_changes:
- fixed the docification of dictionaries

Datei anzeigen

@ -1,7 +1,7 @@
--- ---
namespace: sebastian namespace: sebastian
name: base name: base
version: 0.4.0 version: 0.4.2
readme: README.md readme: README.md

Datei anzeigen

@ -129,7 +129,7 @@ class Types(metaclass=meta):
options: The individual options that this parameter has options: The individual options that this parameter has
""" """
option: AnsibleParameter = dict(type="dict", required=required) option: AnsibleParameter = dict(type="dict", required=required)
option["option"] = options option["options"] = options
if help is not None: if help is not None:
option["description"] = help.split("\n") option["description"] = help.split("\n")
return option return option

Datei anzeigen

@ -36,9 +36,9 @@ def docify(input: Union[dict, AnsibleParameter]) -> dict:
options[name]["default"] = [] options[name]["default"] = []
if "default" in help: if "default" in help:
options[name]["default"] = help["default"] options[name]["default"] = help["default"]
if "options" in help: if "options" in help and help["options"] != {}:
options[name]["options"] = docify(help["options"]) options[name]["options"] = docify(help["options"])
if "choices" in help: if "choices" in help and len(help["choices"]) > 0:
options[name]["choices"] = tuple(help["choices"]) options[name]["choices"] = tuple(help["choices"])
return options return options

Datei anzeigen

@ -1 +1 @@
__version__ = "0.4.0" __version__ = "0.4.2"