From 0c34bf106b450858cd3c9defe2b120ec3016e895 Mon Sep 17 00:00:00 2001 From: Daniel Estoll Date: Fri, 5 Dec 2025 15:05:32 -0800 Subject: [PATCH] Removed duplicate ORs --- polyapi/poly_tables.py | 4 ++-- tests/test_tabi.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/polyapi/poly_tables.py b/polyapi/poly_tables.py index c4c0b68..4c00a72 100644 --- a/polyapi/poly_tables.py +++ b/polyapi/poly_tables.py @@ -315,7 +315,7 @@ def update_one(*, id: str, where: Optional[{table_name}WhereFilter], data: {tabl @staticmethod def update_one(*args, **kwargs) -> {table_name}Row: if args: - if len(args) != 2 or or not isinstance(args[0], str) not isinstance(args[1], dict): + if len(args) != 2 or not isinstance(args[0], str) or not isinstance(args[1], dict): raise TypeError("Expected id and query as arguments or as kwargs") query = args[1] if not isinstance(query["where"], dict): @@ -356,7 +356,7 @@ def delete_one(*, where: Optional[{table_name}WhereFilter]) -> PolyDeleteResult: @staticmethod def delete_one(*args, **kwargs) -> PolyDeleteResult: if args: - if len(args) != 2 or or not isinstance(args[0], str) not isinstance(args[1], dict): + if len(args) != 2 or not isinstance(args[0], str) or not isinstance(args[1], dict): raise TypeError("Expected id and query as arguments or as kwargs") query = args[1] if not isinstance(query["where"], dict): diff --git a/tests/test_tabi.py b/tests/test_tabi.py index 24f1710..d2b4ad0 100644 --- a/tests/test_tabi.py +++ b/tests/test_tabi.py @@ -57,7 +57,7 @@ class MyTableRow(TypedDict, total=False): active: Required[bool] """ Required property """ - optional: dict[str, Any] + optional: Dict[str, Any] @@ -295,7 +295,7 @@ def update_one(*, id: str, where: Optional[MyTableWhereFilter], data: MyTableSub @staticmethod def update_one(*args, **kwargs) -> MyTableRow: if args: - if len(args) != 2 or or not isinstance(args[0], str) not isinstance(args[1], dict): + if len(args) != 2 or not isinstance(args[0], str) or not isinstance(args[1], dict): raise TypeError("Expected id and query as arguments or as kwargs") query = args[1] if not isinstance(query["where"], dict): @@ -336,7 +336,7 @@ def delete_one(*, where: Optional[MyTableWhereFilter]) -> PolyDeleteResult: ... @staticmethod def delete_one(*args, **kwargs) -> PolyDeleteResult: if args: - if len(args) != 2 or or not isinstance(args[0], str) not isinstance(args[1], dict): + if len(args) != 2 or not isinstance(args[0], str) or not isinstance(args[1], dict): raise TypeError("Expected id and query as arguments or as kwargs") query = args[1] if not isinstance(query["where"], dict):