pyPESTO
pyPESTO copied to clipboard
Use Literal consistently to annotate type hint, where string arguments come from a predefined input range.
Feature description
Since python 3.8 one can add a type hint of the form argument: Literal['a', 'b', 'c'], if a string argument comes from a predefined range of inputs. We could use this at many locations, where options are handed over as strings.
To be discussed before
- If we want to do this, we should do it consistently throughout pypesto, and not only at some random spots...
- We would drop python 3.6/7 support by doing that (python would not be importable in that python versions any more). We have to discuss python version support first.
not before #737