From f5c6788b82d6cdfdc83d6aac7f28632c81e77b49 Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Thu, 10 Jun 2021 13:52:28 +0200 Subject: [PATCH] Auto-document Composable.as_bytes() --- docs/api/sql.rst | 1 + psycopg3/psycopg3/sql.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api/sql.rst b/docs/api/sql.rst index aa9c7bd9c..e9ade305f 100644 --- a/docs/api/sql.rst +++ b/docs/api/sql.rst @@ -108,6 +108,7 @@ The `!sql` objects are in the following inheritance hierarchy: .. autoclass:: Composable() + .. automethod:: as_bytes .. automethod:: as_string diff --git a/psycopg3/psycopg3/sql.py b/psycopg3/psycopg3/sql.py index 3ac75f54b..3072f854e 100644 --- a/psycopg3/psycopg3/sql.py +++ b/psycopg3/psycopg3/sql.py @@ -64,7 +64,7 @@ class Composable(ABC): `!Composable` is passed instead of the query string. """ - # TODO: add tests and docs for as_bytes + # TODO: add tests for as_bytes raise NotImplementedError def as_string(self, context: Optional[AdaptContext]) -> str: -- 2.47.3