Skip to content

Default arguments should be allowed to be other than NoValue #451

Open
@fsargent

Description

@fsargent

Argument of type "Literal['']" cannot be assigned to parameter "default" of type "NoValue" in function "str"
"Literal['']" is incompatible with "NoValue"PylancereportGeneralTypeIssues

CleanShot 2023-03-16 at 14 04 05@2x

I believe this would be fixed by changing the methods definitions to Union types.
def str(self, var, default: Union(NoValue, str) = NOTSET, multiline=False):

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions