diff --git a/thrift/lib/python/test/enums.py b/thrift/lib/python/test/enums.py index 0f34651bc27..82faa12be99 100644 --- a/thrift/lib/python/test/enums.py +++ b/thrift/lib/python/test/enums.py @@ -447,6 +447,7 @@ def test_combo_repr(self) -> None: ) class EnumMetaTests(unittest.TestCase): def setUp(self) -> None: + # pyre-ignore[16]: has no attribute `test_types` self.Color: Type[Color] = self.test_types.Color self.Kind: Type[Kind] = self.test_types.Kind self.Perm: Type[Perm] = self.test_types.Perm diff --git a/thrift/lib/python/test/maps.py b/thrift/lib/python/test/maps.py index b6f6566c50f..6cf89a724eb 100644 --- a/thrift/lib/python/test/maps.py +++ b/thrift/lib/python/test/maps.py @@ -283,14 +283,13 @@ def test_contains_enum(self) -> None: # TODO: Collapse these two test cases into parameterized test above class MapMutablePythonTests(unittest.TestCase): - # pyre-ignore Color = mutable_containers_types.Color - # pyre-ignore Maps = mutable_containers_types.Maps # this test case documents behavior divergences from thrift-python @unittest.expectedFailure def test_contains_enum(self) -> None: + # pyre-ignore[6]: Fixme: type error to be addressed later cmap = self.Maps(colorMap={c: c for c in [self.Color.red, self.Color.blue]}) # TODO(T194526180): mutable thrift-python should not raise self.assertNotIn("str", cmap.colorMap) diff --git a/thrift/lib/python/test/sets.py b/thrift/lib/python/test/sets.py index a7bebb562b5..3759a9475cf 100644 --- a/thrift/lib/python/test/sets.py +++ b/thrift/lib/python/test/sets.py @@ -299,14 +299,13 @@ def test_contains_enum(self) -> None: # TODO: Collapse these two test cases into parameterized test above class SetMutablePythonTests(unittest.TestCase): - # pyre-ignore Color = mutable_containers_types.Color - # pyre-ignore Sets = mutable_containers_types.Sets # this test case documents behavior divergences from thrift-python @unittest.expectedFailure def test_contains_enum(self) -> None: + # pyre-ignore[6]: Fixme: type error to be addressed later cset = self.Sets(colorSet={self.Color.red, self.Color.blue}) # TODO(T194526180): mutable thrift-python should not raise self.assertNotIn("str", cset.colorSet) diff --git a/thrift/lib/python/test/structs.py b/thrift/lib/python/test/structs.py index 0801285930f..136dcab8d39 100644 --- a/thrift/lib/python/test/structs.py +++ b/thrift/lib/python/test/structs.py @@ -34,7 +34,6 @@ from parameterized import parameterized_class -# pyre-ignore[21]: Could not find a name from testing.thrift_mutable_types import __Reserved as DoubleUnderscoreReservedMutable from testing.thrift_types import ( @@ -98,10 +97,10 @@ def setUp(self) -> None: self.is_mutable_run: bool = self.test_types.__name__.endswith( "thrift_mutable_types" ) + # pyre-ignore[8]: Intentional for test self.DoubleUnderscoreReserved: Type[DoubleUnderscoreReserved] = ( DoubleUnderscoreReserved if not self.is_mutable_run - # pyre-ignore[16]: no attribute else DoubleUnderscoreReservedMutable ) # pyre-ignore[16]: has no attribute `serializer_module`