mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
[pyupgrade
] Do not upgrade functional TypedDicts with private field names to the class-based syntax (UP013
) (#16219)
This commit is contained in:
parent
66a0467305
commit
d8e3fcca97
3 changed files with 32 additions and 3 deletions
|
@ -46,3 +46,9 @@ MyType = TypedDict("MyType", dict())
|
|||
X = TypedDict("X", {
|
||||
"some_config": int, # important
|
||||
})
|
||||
|
||||
# Private names should not be reported (OK)
|
||||
WithPrivate = TypedDict("WithPrivate", {"__x": int})
|
||||
|
||||
# Dunder names should not be reported (OK)
|
||||
WithDunder = TypedDict("WithDunder", {"__x__": int})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue