Skip to content

Bugfix optional list type#98

Merged
da-h merged 3 commits intomasterfrom
bugfix_optional_list_type
Nov 18, 2021
Merged

Bugfix optional list type#98
da-h merged 3 commits intomasterfrom
bugfix_optional_list_type

Conversation

@da-h
Copy link
Copy Markdown
Owner

@da-h da-h commented Nov 18, 2021

Bugfix: mf.optional for list types

This MR enables (or fixes mf.optional for) list types.

Description

Miniflask did not allow to specify empty CLI-lists previously.
Using mf.optional this is now possible.

Not specifying the variable in CLI results in an empty list.

Check all before creating this PR:

  • Documentation adapted
  • unit tests adapted / created

Example Usage

def register(mf):
    mf.register_defaults({
       "variablelist": mf.optional([int])
    })

@da-h da-h added this to the v3.0 milestone Nov 18, 2021
@da-h da-h force-pushed the bugfix_optional_list_type branch from 73cbcb9 to d5da0ab Compare November 18, 2021 15:03
@da-h da-h merged commit 42d4f54 into master Nov 18, 2021
github-actions Bot pushed a commit that referenced this pull request Nov 18, 2021
@sbrodehl sbrodehl deleted the bugfix_optional_list_type branch October 7, 2022 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant