From eda59d4280567e88f15fbca47a744992b4712b4b Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 24 Oct 2024 16:43:22 -0700 Subject: [PATCH] accept None as empty string --- google/cloud/bigtable/data/_cross_sync/_decorators.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google/cloud/bigtable/data/_cross_sync/_decorators.py b/google/cloud/bigtable/data/_cross_sync/_decorators.py index 4e79331dd..2f4c8374f 100644 --- a/google/cloud/bigtable/data/_cross_sync/_decorators.py +++ b/google/cloud/bigtable/data/_cross_sync/_decorators.py @@ -201,7 +201,7 @@ def __init__( sync_name: str | None = None, *, replace_symbols: dict[str, str] | None = None, - docstring_format_vars: dict[str, tuple[str, str]] | None = None, + docstring_format_vars: dict[str, tuple[str | None, str | None]] | None = None, rm_aio: bool = False, add_mapping_for_name: str | None = None, ): @@ -209,10 +209,10 @@ def __init__( self.replace_symbols = replace_symbols docstring_format_vars = docstring_format_vars or {} self.async_docstring_format_vars = { - k: v[0] for k, v in docstring_format_vars.items() + k: v[0] or "" for k, v in docstring_format_vars.items() } self.sync_docstring_format_vars = { - k: v[1] for k, v in docstring_format_vars.items() + k: v[1] or "" for k, v in docstring_format_vars.items() } self.rm_aio = rm_aio self.add_mapping_for_name = add_mapping_for_name