mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 17:15:38 +07:00
GitOrigin-RevId: 56876a5dd073a06c3fcc92f63ed1f5674830bc25
26 lines
541 B
HTML
26 lines
541 B
HTML
<html>
|
|
<body>
|
|
<p>Reports invalid definition of a
|
|
<a href="https://docs.python.org/3/library/typing.html#typing.NamedTuple">typing.NamedTuple</a>.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
import typing
|
|
|
|
|
|
class FullName(typing.NamedTuple):
|
|
first: str
|
|
last: str = ""
|
|
middle: str
|
|
</code></pre>
|
|
<p>As a fix, place the field with the default value after the fields without default values:</p>
|
|
<pre><code>
|
|
import typing
|
|
|
|
|
|
class FullName(typing.NamedTuple):
|
|
first: str
|
|
middle: str
|
|
last: str = ""
|
|
</code></pre>
|
|
</body>
|
|
</html> |