diff options
| author | django-bot <ops@djangoproject.com> | 2025-07-22 20:41:41 -0700 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-07-23 20:17:55 -0300 |
| commit | 69a93a88edb56ba47f624dac7a21aacc47ea474f (patch) | |
| tree | f57507a4435d032493cae40e06ecb254790b67b2 /django/db/backends/postgresql/base.py | |
| parent | 55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff) | |
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.
Diffstat (limited to 'django/db/backends/postgresql/base.py')
| -rw-r--r-- | django/db/backends/postgresql/base.py | 26 |
1 files changed, 14 insertions, 12 deletions
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'\\_')" ) |
