1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[2.2.x] Fixed "byte string" typo in various docs and comments.

Backport of 881362986a from master
This commit is contained in:
Mariusz Felisiak
2019-03-27 12:15:53 +01:00
parent d7876fc999
commit 609b7f1123
8 changed files with 11 additions and 11 deletions

View File

@@ -146,15 +146,15 @@ class ContentFile(File):
def endswith_cr(line):
"""Return True if line (a text or byte string) ends with '\r'."""
"""Return True if line (a text or bytestring) ends with '\r'."""
return line.endswith('\r' if isinstance(line, str) else b'\r')
def endswith_lf(line):
"""Return True if line (a text or byte string) ends with '\n'."""
"""Return True if line (a text or bytestring) ends with '\n'."""
return line.endswith('\n' if isinstance(line, str) else b'\n')
def equals_lf(line):
"""Return True if line (a text or byte string) equals '\n'."""
"""Return True if line (a text or bytestring) equals '\n'."""
return line == ('\n' if isinstance(line, str) else b'\n')

View File

@@ -22,7 +22,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
sql_delete_procedure = 'DROP FUNCTION %(procedure)s(%(param_types)s)'
def quote_value(self, value):
# getquoted() returns a quoted byte string of the adapted value.
# getquoted() returns a quoted bytestring of the adapted value.
return psycopg2.extensions.adapt(value).getquoted().decode()
def _field_indexes_sql(self, model, field):

View File

@@ -46,7 +46,7 @@ class SafeText(str, SafeData):
"""
def __add__(self, rhs):
"""
Concatenating a safe string with another safe byte string or
Concatenating a safe string with another safe bytestring or
safe string is safe. Otherwise, the result is no longer safe.
"""
t = super().__add__(rhs)