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
I found 2 literals that trigger an error: in and On Hold. I saw a closed issue for "in", but I'm not sure it was fixed or just dismissed.
Anyway this is the error message:
return parse(source_str)
^^^^^^^^^^^^^^^^^
libcst._exceptions.ParserSyntaxError: Syntax Error @ 1:1.
parser error: error at 1:2: expected one of (, *, +, -, ..., AWAIT, EOF, False, NUMBER, None, True, [, break, continue, lambda, match, not, pass, ~
in
^
Could bump-pydantic produce more helpful error message, e.g. with the whole line and line number? I took me a while to understand which "in" is the problem, because running grep in produced a lot of output :)
These are the reproducers:
1.
from typing import Literal
from pydantic import BaseModel
class MySuperPhoneObject(BaseModel):
state: Literal["Closed", "On Hold", "Speaking", "Ringing"]
from typing import Literal
from pydantic import BaseModel
class MySuperPBXQueueObject(BaseModel):
state: Literal["in", "out"]
The text was updated successfully, but these errors were encountered:
Hi,
I found 2 literals that trigger an error:
in
andOn Hold
. I saw a closed issue for "in", but I'm not sure it was fixed or just dismissed.Anyway this is the error message:
Could bump-pydantic produce more helpful error message, e.g. with the whole line and line number? I took me a while to understand which "in" is the problem, because running
grep in
produced a lot of output :)These are the reproducers:
1.
The text was updated successfully, but these errors were encountered: