You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Option class init overrides the type parameter before it checks whether its OMITTED, resulting in the code that inferrs the type from the default value never to run the offending line
type=builtins.type# this overrides the type parameterifsum([self.defaultisnotOMITTED,
self.default_factoryisnotOMITTED,
self.default_by_runisnotOMITTED]) >1:
raiseRuntimeError(f"Tried to specify more than one default "f"for option {self.name}.")
iftypeisOMITTEDanddefaultisnotOMITTED: # will never evaluate to True since type is now set to builtins.typeself.type=type(default)
Expected behavior
type is expected to be inferred from the default value when its not OMITTED
The text was updated successfully, but these errors were encountered:
The Option class init overrides the type parameter before it checks whether its OMITTED, resulting in the code that inferrs the type from the default value never to run
the offending line
Expected behavior
type is expected to be inferred from the default value when its not OMITTED
The text was updated successfully, but these errors were encountered: