-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This snippit:
import pandas as pd
obj = { k: v for k,v in pd.DataFrame.from_records([], columns=["foo", "bar", "baz"]).groupby("foo")}
Is rewritten to the following using the C416 rule (no unnecessary comprehensions):
import pandas pd
obj = dict(pd.DataFrame.from_records([], columns=["foo", "bar", "baz"]).groupby("foo"))
However that generates a TypeError when I run it. I filed a bug about this upstream (see pandas-dev/pandas#53287) but it makes me wonder if this rule is safe to apply. Current using ruff 0.0.262.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working