Page MenuHomeElementl

(dict-where-type-is-used-2) Allow list in config
ClosedPublic

Authored by schrockn on Jan 9 2020, 1:17 AM.

Details

Summary

Now that we allow unadorned dictionaries to specify config
schema, it's natural to extend this to lists as well. Instead of
List[str] you can just do [str]. With this change I believe we
can rename the config List and Dict to Array and Shape and the user
will never have to see that if they just use the condensed syntax

Depends on D1796

Test Plan

BK

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

schrockn edited the summary of this revision. (Show Details)
schrockn added reviewers: alangenfeld, max.

upmessage

goforit

python_modules/dagster/dagster/core/types/config/field.py
50–59

would probably be good to include some explanation of what list is used for in this context in these errors instead of assuming I knew what i doing and slightly messed up. Maybe just a lil example like

List specifications must only be of length 1 ie [str]

would be sufficient

python_modules/dagster/dagster/core/types/config/field_utils.py
309–321

i assume these are less likely to be user facing? if not same concern as above

This revision is now accepted and ready to land.Jan 9 2020, 10:29 PM