From 69a93a88edb56ba47f624dac7a21aacc47ea474f Mon Sep 17 00:00:00 2001 From: django-bot Date: Tue, 22 Jul 2025 20:41:41 -0700 Subject: Refs #36500 -- Rewrapped long docstrings and block comments via a script. Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505. --- django/db/backends/postgresql/base.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'django/db/backends/postgresql/base.py') diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index a0b5e4154e..cafa4c7a9c 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -61,8 +61,8 @@ else: psycopg2.extensions.register_adapter(SafeString, psycopg2.extensions.QuotedString) psycopg2.extras.register_uuid() - # Register support for inet[] manually so we don't have to handle the Inet() - # object on load all the time. + # Register support for inet[] manually so we don't have to handle the + # Inet() object on load all the time. INETARRAY_OID = 1041 INETARRAY = psycopg2.extensions.new_array_type( (INETARRAY_OID,), @@ -71,7 +71,8 @@ else: ) psycopg2.extensions.register_type(INETARRAY) -# Some of these import psycopg, so import them after checking if it's installed. +# Some of these import psycopg, so import them after checking if it's +# installed. from .client import DatabaseClient # NOQA isort:skip from .creation import DatabaseCreation # NOQA isort:skip from .features import DatabaseFeatures # NOQA isort:skip @@ -90,9 +91,10 @@ class DatabaseWrapper(BaseDatabaseWrapper): vendor = "postgresql" display_name = "PostgreSQL" # This dictionary maps Field objects to their associated PostgreSQL column - # types, as strings. Column-type strings can contain format strings; they'll - # be interpolated against the values of Field.__dict__ before being output. - # If a column type is set to None, it won't be included in the output. + # types, as strings. Column-type strings can contain format strings; + # they'll be interpolated against the values of Field.__dict__ before being + # output. If a column type is set to None, it won't be included in the + # output. data_types = { "AutoField": "integer", "BigAutoField": "bigint", @@ -150,13 +152,13 @@ class DatabaseWrapper(BaseDatabaseWrapper): } # The patterns below are used to generate SQL pattern lookup clauses when - # the right-hand side of the lookup isn't a raw string (it might be an expression - # or the result of a bilateral transformation). - # In those cases, special characters for LIKE operators (e.g. \, *, _) should be - # escaped on database side. + # the right-hand side of the lookup isn't a raw string (it might be an + # expression or the result of a bilateral transformation). In those cases, + # special characters for LIKE operators (e.g. \, *, _) should be escaped on + # database side. # - # Note: we use str.format() here for readability as '%' is used as a wildcard for - # the LIKE operator. + # Note: we use str.format() here for readability as '%' is used as a + # wildcard for the LIKE operator. pattern_esc = ( r"REPLACE(REPLACE(REPLACE({}, E'\\', E'\\\\'), E'%%', E'\\%%'), E'_', E'\\_')" ) -- cgit v1.3