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
configparser.UNNAMED_SECTION has been introduced in Python 3.13. It is "A special object representing a section name used to reference the unnamed section".
A specific example of usage is given in the documentation:
This currently fails to typecheck since as all section arguments are typed as str. However, UNNAMED_SECTION is not an str. See for example here and here.
See also this example in the Pyright Playground giving:
Argument of type "_UNNAMED_SECTION" cannot be assigned to parameter "section" of type "str" in function "get"
"_UNNAMED_SECTION" is not assignable to "str" (reportArgumentType).
The text was updated successfully, but these errors were encountered:
UNNAMED_SECTION was added in Python 3.13 and can be used in place of any
section name. It is not actually a string though, so it needs a
separate type.
configparser.UNNAMED_SECTION
has been introduced in Python 3.13. It is "A special object representing a section name used to reference the unnamed section".A specific example of usage is given in the documentation:
This currently fails to typecheck since as all
section
arguments are typed asstr
. However,UNNAMED_SECTION
is not anstr
. See for example here and here.See also this example in the Pyright Playground giving:
The text was updated successfully, but these errors were encountered: