From: Denis Laxalde Date: Thu, 10 Jun 2021 11:52:28 +0000 (+0200) Subject: Auto-document Composable.as_bytes() X-Git-Tag: 3.0.dev0~24^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5c6788b82d6cdfdc83d6aac7f28632c81e77b49;p=thirdparty%2Fpsycopg.git Auto-document Composable.as_bytes() --- 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: