From: Federico Caselli Date: Sat, 4 Nov 2023 20:32:16 +0000 (+0100) Subject: Properly document ARRAY.contains. #10587 X-Git-Tag: rel_1_4_51~7^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=463952866fa0dfeaa8d7acaec66fbccb0535c8dc;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Properly document ARRAY.contains. #10587 Change-Id: I86e4f01f5d897b257246fe5f970b78e3444aca3e (cherry picked from commit 1bb9c4b94483a25057bad3d78cf9956e8f292330) --- diff --git a/doc/build/changelog/changelog_13.rst b/doc/build/changelog/changelog_13.rst index 629387ff97..1e14314d08 100644 --- a/doc/build/changelog/changelog_13.rst +++ b/doc/build/changelog/changelog_13.rst @@ -3336,7 +3336,7 @@ :tags: change, orm :tickets: 4412 - Added a new function :func:`.close_all_sessions` which takes + Added a new function :func:`_orm.close_all_sessions` which takes over the task of the :meth:`.Session.close_all` method, which is now deprecated as this is confusing as a classmethod. Pull request courtesy Augustin Trancart. diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index eed63e5070..36fcabea5a 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -2846,6 +2846,13 @@ class ARRAY(SchemaEventTarget, Indexable, Concatenable, TypeEngine): return operators.getitem, index, return_type def contains(self, *arg, **kw): + """``ARRAY.contains()`` not implemented for the base ARRAY type. + Use the dialect-specific ARRAY type. + + .. seealso:: + + :class:`_postgresql.ARRAY` - PostgreSQL specific version. + """ raise NotImplementedError( "ARRAY.contains() not implemented for the base " "ARRAY type; please use the dialect-specific ARRAY type" diff --git a/setup.cfg b/setup.cfg index 6ba325e8f1..307087dc0b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -108,7 +108,7 @@ enable-extensions = G # E203 is due to https://github.com/PyCQA/pycodestyle/issues/373 ignore = - A003, + A003, A004 D, E203,E305,E711,E712,E721,E722,E741, N801,N802,N806,