-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Since #119 was fixed via #125, I tried ruff again (build from main
) with pydantic.
I get a few remaining F821
errors due to use of strings in Literal
, the line numbers are also incorrect - seems to always be 1
.
From this code (and some other places in that file), I get:
pydantic/config.py:1:1: F821 Undefined name `deep`
pydantic/config.py:1:1: F821 Undefined name `none`
pydantic/config.py:1:1: F821 Undefined name `deep`
pydantic/config.py:1:1: F821 Undefined name `shallow`
pydantic/config.py:1:1: F821 Undefined name `before_validation`
pydantic/config.py:1:1: F821 Undefined name `after_validation`
pydantic/config.py:1:1: F821 Undefined name `none`
pydantic/config.py:1:1: F821 Undefined name `shallow`
pydantic/config.py:1:1: F821 Undefined name `before_validation`
pydantic/config.py:1:1: F821 Undefined name `after_validation`
Example code:
copy_on_model_validation: Literal['none', 'deep', 'shallow']
post_init_call: Literal['before_validation', 'after_validation']
charliermarsh
Metadata
Metadata
Assignees
Labels
No labels