From fd7715c11f16bcd33a1c9a4d096ea86239d43ae5 Mon Sep 17 00:00:00 2001 From: Peter Allen Webb Date: Tue, 16 Jul 2024 17:49:18 -0400 Subject: [PATCH] Formatting fixes. --- dbt/adapters/postgres/record/cursor/cursor.py | 2 +- dbt/adapters/postgres/record/cursor/status.py | 1 + dbt/adapters/postgres/record/handle.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dbt/adapters/postgres/record/cursor/cursor.py b/dbt/adapters/postgres/record/cursor/cursor.py index a7edfe2..a096c9f 100644 --- a/dbt/adapters/postgres/record/cursor/cursor.py +++ b/dbt/adapters/postgres/record/cursor/cursor.py @@ -8,8 +8,8 @@ class PostgresRecordReplayCursor(RecordReplayCursor): """A custom extension of RecordReplayCursor that adds the statusmessage property which is specific to psycopg.""" + @property @record_function(CursorGetStatusMessageRecord, method=True, id_field_name="connection_name") def statusmessage(self): return self.native_cursor.statusmessage - diff --git a/dbt/adapters/postgres/record/cursor/status.py b/dbt/adapters/postgres/record/cursor/status.py index 55b4075..1e8d962 100644 --- a/dbt/adapters/postgres/record/cursor/status.py +++ b/dbt/adapters/postgres/record/cursor/status.py @@ -3,6 +3,7 @@ from dbt_common.record import Record, Recorder + @dataclasses.dataclass class CursorGetStatusMessageParams: connection_name: str diff --git a/dbt/adapters/postgres/record/handle.py b/dbt/adapters/postgres/record/handle.py index d75e0e2..119dc2f 100644 --- a/dbt/adapters/postgres/record/handle.py +++ b/dbt/adapters/postgres/record/handle.py @@ -2,6 +2,7 @@ from dbt.adapters.postgres.record.cursor.cursor import PostgresRecordReplayCursor + class PostgresRecordReplayHandle(RecordReplayHandle): """A custom extension of RecordReplayHandle that returns a psycopg-specific PostgresRecordReplayCursor object."""