From bb1c2a9d658af95a7508e9fbfbf7de67ac395353 Mon Sep 17 00:00:00 2001 From: Seshu Brahma Date: Tue, 14 Nov 2023 14:53:26 -0800 Subject: [PATCH] Fix mypy --- examples/data_masking/tests/src/single_mock.py | 4 ++-- mypy.ini | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/data_masking/tests/src/single_mock.py b/examples/data_masking/tests/src/single_mock.py index ea0135b9401..45249a02d58 100644 --- a/examples/data_masking/tests/src/single_mock.py +++ b/examples/data_masking/tests/src/single_mock.py @@ -16,12 +16,12 @@ def __init__( ): super().__init__(json_serializer=json_serializer, json_deserializer=json_deserializer) - def encrypt(self, data: bytes | str, **kwargs) -> str: + def encrypt(self, data, **kwargs) -> str: data = self.json_serializer(data) ciphertext = base64.b64encode(data).decode() return ciphertext - def decrypt(self, data: bytes, **kwargs) -> Any: + def decrypt(self, data, **kwargs) -> Any: ciphertext_decoded = base64.b64decode(data) ciphertext = self.json_deserializer(ciphertext_decoded) return ciphertext diff --git a/mypy.ini b/mypy.ini index cb2d3ce2443..36df3cebfdc 100644 --- a/mypy.ini +++ b/mypy.ini @@ -8,6 +8,7 @@ show_column_numbers = True show_error_codes = True show_error_context = True disable_error_code = annotation-unchecked +exclude = examples/data_masking/src [mypy-jmespath] ignore_missing_imports=True