pyPESTO icon indicating copy to clipboard operation
pyPESTO copied to clipboard

Use Literal consistently to annotate type hint, where string arguments come from a predefined input range.

Open jvanhoefer opened this issue 4 years ago • 1 comments

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.

jvanhoefer avatar Jul 21 '21 09:07 jvanhoefer

not before #737

yannikschaelte avatar Dec 07 '21 13:12 yannikschaelte