Closed domendobnikar closed 1 year ago
One note @domendobnikar . There are still errors (https://github.com/ScaleComputing/HyperCoreAnsibleCollection/actions/runs/4082190817/jobs/7036274867)
plugins/module_utils/utils.py:33: in <module>
input: dict[Any, Any], *field_names: str, ansible_hypercore_map: dict[Any, Any]
E TypeError: 'type' object is not subscriptable
It should be Dict
from typing, not dict
, for python 3.8.
It should be
Dict
from typing, notdict
, for python 3.8.
Oh ok will fix.
One note @domendobnikar . There are still errors (https://github.com/ScaleComputing/HyperCoreAnsibleCollection/actions/runs/4082190817/jobs/7036274867)
plugins/module_utils/utils.py:33: in <module> input: dict[Any, Any], *field_names: str, ansible_hypercore_map: dict[Any, Any] E TypeError: 'type' object is not subscriptable
It should be
Dict
from typing, notdict
, for python 3.8.
I think here we should decide if we use "from future import annotations" or using typing. I think the recomended way is to use the first one. What do you think?
I think here we should decide if we use "from future import annotations" or using typing. I think the recomended way is to use the first one. What do you think?
We need to use from **future** import annotations
to reference to the same class within the class itself; Example would be the Get
methods.
Not sure if it fixes this specific error.
I think here we should decide if we use "from future import annotations" or using typing. I think the recomended way is to use the first one. What do you think?
We need to use
from **future** import annotations
to reference to the same class within the class itself; Example would be theGet
methods. Not sure if it fixes this specific error.
Also for the tuple vs Tuple, list vs List, dict vs Dict...
make mypy
commandutils
andRestClient