-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
T: bugSomething isn't workingSomething isn't working
Description
I am using the online formatter.
Describe the bug
black failed with two ignores for type checkers.
To Reproduce
import pandas as pd
interval_td = pd.Interval(
pd.Timedelta("1 days"), pd.Timedelta("2 days"), closed="neither"
)
_td = ( # pyright: ignore[reportOperatorIssue,reportUnknownVariableType]
interval_td
- pd.Interval( # type: ignore[operator]
pd.Timedelta(1, "ns"), pd.Timedelta(2, "ns")
)
)And run it with the online playground.
The resulting error is:
INTERNAL ERROR: Black 25.1.1.dev28+g314f8cf on Python (CPython) 3.12.11 produced code that is not equivalent to the source. Please report a bug on https://github.com/psf/black/issues. This diff might be helpful: /tmp/blk_rf3407oy.log
--- src
+++ dst
@@ -215,8 +215,6 @@
keywords=
) # /Call
) # /BinOp
) # /Assign
type_ignores=
- TypeIgnore(
- ) # /TypeIgnore
) # /Module
Expected behavior
black should handle this.
Environment
Online playground
Additional context
None
wowkin2
Metadata
Metadata
Assignees
Labels
T: bugSomething isn't workingSomething isn't working