-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
In certain cases, we have a mypy assertion like:
@pytest.mark.mypy_testing
def test_foo():
link = Link()
link1.url = 123 # E: Incompatible types in assignment (expression has type "int", variable has type "Optional[str]")
However, the last line already covers 122-characters. When using Black (which has a default of 88 chars - reference), it'd turn something like:
@pytest.mark.mypy_testing
def test_foo():
link = Link()
link1.url = (
123
) # E: Incompatible types in assignment (expression has type "int", variable has type "Optional[str]")
The issue with this new format is that pytest would error out with something like:
5: error (unexpected): Incompatible types in assignment (expression has type "int", variable has type "Optional[str]")
6: error (missing): Incompatible types in assignment (expression has type "int", variable has type "Optional[str]")
Perhaps there should be another interface that could help declare the assertions aside from comments? or maybe, it should be possible to breakdown the comments into multi-line chunks?
kmike, Gallaecio, davidfritzsche, cdleonard, Suor and 1 more
Metadata
Metadata
Assignees
Labels
No labels