Skip to content

Commit dffba58

Browse files
Merge branch 'main' into edgarrmondragon/chore/refactors-typos-cleanup
2 parents 9da58a5 + d07b415 commit dffba58

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

target_postgres/connector.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,7 @@ def pick_individual_type(self, jsonschema_type: dict): # noqa: PLR0911
310310
return ARRAY(self.to_sql_type({"type": items_type}))
311311

312312
# Case 3: tuples
313-
if isinstance(items, list):
314-
return ARRAY(JSONB())
315-
316-
# All other cases, return JSONB
317-
return JSONB()
313+
return ARRAY(JSONB()) if isinstance(items, list) else JSONB()
318314

319315
# string formats
320316
if jsonschema_type.get("format") == "date-time":
@@ -398,7 +394,7 @@ def create_empty_table( # type: ignore[override] # noqa: PLR0913
398394
raise RuntimeError(
399395
f"Schema for table_name: '{table_name}'"
400396
f"does not define properties: {schema}"
401-
)
397+
) from None
402398

403399
for property_name, property_jsonschema in properties.items():
404400
is_primary_key = property_name in primary_keys

target_postgres/sinks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def schema_name(self) -> str | None:
288288
"""Return the schema name or `None` if using names with no schema part.
289289
290290
Note that after the next SDK release (after 0.14.0) we can remove this
291-
as it's already up-streamed.
291+
as it's already implemented upstream.
292292
293293
Returns:
294294
The target schema name.

0 commit comments

Comments
 (0)