hundreds-father-404
10/11/2021, 9:35 PMoverrides
field, which allows you to more easily override metadata for a single file w/o having to define new targets. For example,
overrides={
"foo_test.py": {"timeout": 120},
("bar_test.py", "baz_test.py"): {"timeout": 240},
}
Feedback welcomed on what this syntax should look like: ๐งตoverrides={
"foo_test.py": override(timeout=120),
("bar_test.py", "baz_test.py"): override(timeout= 240),
}
proud-dentist-22844
10/12/2021, 1:40 AMoverride()
provide over the dict syntax?hundreds-father-404
10/12/2021, 1:41 AMkwarg="value"
overrides
is already hard to type -- I confuse myself with the number of `r`s to put. (Speaking of which, totally open to better names for that field!)proud-dentist-22844
10/12/2021, 1:45 AM{"timeout": 240}
dict literal, they can always use dict(timeout=240)
. So, I think override()
is a step too far.hundreds-father-404
10/12/2021, 1:45 AMdict()
or {}
?
I'm trying to keep in mind what non-Python developers might prefer, but that's hard because of the Curse of Knowledge ๐คproud-dentist-22844
10/12/2021, 1:48 AMdict()
is generally bad practice imo.hundreds-father-404
10/12/2021, 1:49 AMdict()
it forces the keys to already be str
, which is important here. But not sure that's worth itdict(timeout=120)
, and is it any different than {}
?"proud-dentist-22844
10/12/2021, 1:50 AMdict()
helping to enforce string keys). You can validate and throw an error on non string keys, and then you can print a more helpful message than a python syntax error.