typeddicts_alt_syntax error

Invalid TypedDict(...) functional-syntax call

The TypedDict(name, {...}) functional syntax has several constraints:

1. The second positional argument must be a dict literal {...}. 2. All keys in the dict literal must be string literals. 3. The first positional argument (the declared name) must match the variable name on the left-hand side of the assignment. 4. Only total= is recognised as a keyword argument; anything else is an error.

How to handle it

Every rule is on by default — strict is the default, not a cage. You can dial typeddicts_alt_syntax down per-file or per-path from your editor or pyproject.toml, or fix the code so it type-checks. See the Type System rules and the complete diagnostic reference.

Canonical URL: https://www.basilisk-python.dev/errors/typeddicts_alt_syntax