-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violationshelp wantedContributions especially welcomeContributions especially welcome
Description
Starting with this code:
from typing import NamedTuple, TypedDict
X = TypedDict("X", {
"some_config": int, # important
})
Y = NamedTuple("Y", [
("some_config", int), # important
])Ruff (via rules UP013 and UP014) turns it into:
from typing import NamedTuple, TypedDict
class X(TypedDict):
some_config: int
class Y(NamedTuple):
some_config: intIdeally it should retain the end-of-line comments.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixesRelated to suggested fixes for violationsRelated to suggested fixes for violationshelp wantedContributions especially welcomeContributions especially welcome