From 09dc4427fce97f769da66c9ff3bd55e737f91f7d Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Mon, 21 Oct 2024 08:08:18 -0700 Subject: [PATCH] Clean up errors and remove unused ignores] [batch:18/554] [shard:3/N] Reviewed By: connernilsen Differential Revision: D64651745 fbshipit-source-id: a554a1d01ba05ff3639fb205ed7a417aa99aac0c --- thrift/lib/py3/test/auto_migrate/metadata.py | 5 ----- thrift/lib/python/any/any_registry.py | 4 ---- 2 files changed, 9 deletions(-) diff --git a/thrift/lib/py3/test/auto_migrate/metadata.py b/thrift/lib/py3/test/auto_migrate/metadata.py index 525b9802291..96a26d83da9 100644 --- a/thrift/lib/py3/test/auto_migrate/metadata.py +++ b/thrift/lib/py3/test/auto_migrate/metadata.py @@ -17,7 +17,6 @@ import unittest -# pyre-fixme[21]: Could not find module `testing.metadata`. import testing.metadata from apache.thrift.metadata.types import ThriftPrimitiveType from testing.clients import TestingService, TestingServiceChild @@ -29,7 +28,6 @@ class MetadataTests(unittest.TestCase): def test_metadata_enums(self) -> None: - # pyre-fixme[16]: Module `testing` has no attribute `metadata`. meta = gen_metadata(testing.metadata) enumName = "testing.Perm" self.assertIsNotNone(meta) @@ -44,7 +42,6 @@ def test_metadata_enums(self) -> None: self.assertEqual(permEnum, gen_metadata(Perm(1))) def test_metadata_structs(self) -> None: - # pyre-fixme[16]: Module `testing` has no attribute `metadata`. meta = gen_metadata(testing.metadata) structName = "testing.hard" self.assertIsNotNone(meta) @@ -136,7 +133,6 @@ def test_metadata_struct_recursive(self) -> None: self.assertEqual(other_integers.is_union, integers.is_union) def test_metadata_exceptions(self) -> None: - # pyre-fixme[16]: Module `testing` has no attribute `metadata`. meta = gen_metadata(testing.metadata) errorName = "testing.HardError" self.assertIsNotNone(meta) @@ -159,7 +155,6 @@ def test_metadata_exceptions(self) -> None: self.assertEqual(field.type.value, ThriftPrimitiveType.THRIFT_I32_TYPE) def test_metadata_services(self) -> None: - # pyre-fixme[16]: Module `testing` has no attribute `metadata`. meta = gen_metadata(testing.metadata) serviceName = "testing.TestingService" self.assertIsNotNone(meta) diff --git a/thrift/lib/python/any/any_registry.py b/thrift/lib/python/any/any_registry.py index 2fc2ece9280..4ea21caad13 100644 --- a/thrift/lib/python/any/any_registry.py +++ b/thrift/lib/python/any/any_registry.py @@ -365,10 +365,6 @@ def _load_struct(self, any_obj: Any) -> StructOrUnionOrException: def _load_primitive(self, any_obj: Any) -> PrimitiveType: return deserialize_primitive( - # pyre-fixme[6]: For 1st argument expected `Type[Variable[TPrimitive - # (bound to Union[Enum, IOBuf, bool, bytes, float, int, str])]]` but got - # `Type[Union[Enum, GeneratedError, IOBuf, StructOrUnion, bool, bytes, - # float, int, str]]`. self._type_name_to_serializable_type(any_obj.type.name), any_obj.data, protocol=_standard_protocol_to_serializer_protocol(