Fix mypy checks

This commit is contained in:
Bruno Oliveira 2020-06-09 14:48:49 -03:00
parent 5a78df4bd0
commit c229d6f46f
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ from dataclasses import field
@dataclass @dataclass
class SimpleDataObject: class SimpleDataObject:
field_a: int = field() field_a: int = field()
field_b: int = field() field_b: str = field()
@dataclass @dataclass

View File

@ -888,6 +888,7 @@ class TestAssert_reprcompare_attrsclass:
right = SimpleDataObject(OtherDataObject(1, "b"), "b") right = SimpleDataObject(OtherDataObject(1, "b"), "b")
lines = callequal(left, right) lines = callequal(left, right)
assert lines is not None
assert "Matching attributes" not in lines assert "Matching attributes" not in lines
for line in lines[1:]: for line in lines[1:]:
assert "field_b:" not in line assert "field_b:" not in line
@ -908,8 +909,8 @@ class TestAssert_reprcompare_attrsclass:
right = SimpleDataObject(OtherDataObject(1, "b"), "b") right = SimpleDataObject(OtherDataObject(1, "b"), "b")
lines = callequal(left, right) lines = callequal(left, right)
assert lines is not None
assert "field_d: 'a' != 'b'" in lines assert "field_d: 'a' != 'b'" in lines
print("\n".join(lines))
def test_attrs_verbose(self) -> None: def test_attrs_verbose(self) -> None:
@attr.s @attr.s