bitter-ability-32190
02/24/2022, 2:36 PMdefault
for "scalar" option types (like str
, bool
, int
) etc... in the new XOption
descriptor classes? The reasoning is that (especially for bool, although also for others) right now the implicit default of None
isn't obvious. Users might expect a StrOption
to have a default of ""
, etc...bitter-ability-32190
02/24/2022, 2:37 PMbitter-ability-32190
02/24/2022, 2:38 PMBoolOption
ācurved-television-6568
02/24/2022, 2:41 PMNone
to scalar()
so, you get ""
for str
and 0
for int
etc, so we canāt still provide an explicit default when applicable.curved-television-6568
02/24/2022, 2:43 PMbitter-ability-32190
02/24/2022, 2:44 PMcurved-television-6568
02/24/2022, 2:47 PMbitter-ability-32190
02/24/2022, 2:47 PMbitter-ability-32190
02/24/2022, 2:47 PMNone
) in favor of making clients pass None
themselvescurved-television-6568
02/24/2022, 2:48 PMbitter-ability-32190
02/24/2022, 2:57 PMmypy
can't be taught how to handle this. pyright
handles it right out of the box, pun intended)bitter-ability-32190
02/24/2022, 3:00 PMnpm
to run š happy-kitchen-89482
02/24/2022, 3:13 PMbitter-ability-32190
02/24/2022, 3:18 PMbitter-ability-32190
02/24/2022, 3:18 PMbitter-ability-32190
02/24/2022, 3:44 PMmypy
doesnt support but others do, typing_extensions.Self
)happy-kitchen-89482
02/24/2022, 3:58 PMhappy-kitchen-89482
02/24/2022, 3:58 PMhappy-kitchen-89482
02/24/2022, 4:00 PMhappy-kitchen-89482
02/24/2022, 4:00 PMbitter-ability-32190
02/24/2022, 4:05 PMhappy-kitchen-89482
02/24/2022, 4:06 PMhappy-kitchen-89482
02/24/2022, 4:06 PMbitter-ability-32190
02/24/2022, 4:07 PMbitter-ability-32190
02/24/2022, 4:55 PM