Invalid definition of 'typing.NamedTuple'
Reports invalid definition of a typing.NamedTuple.
Example:
import typing
class FullName(typing.NamedTuple):
first: str
last: str = ""
middle: str
As a fix, place the field with the default value after the fields without default values:
import typing
class FullName(typing.NamedTuple):
first: str
middle: str
last: str = ""
Inspection Details | |
---|---|
Available in: | DataSpell 2023.3, PyCharm 2023.3 |
Plugin: | Python Community Edition, 233.SNAPSHOT |
Last modified: 13 July 2023