summaryrefslogtreecommitdiff
path: root/django/core/files/base.py
diff options
context:
space:
mode:
authorAnton Samarchyan <anton.samarchyan@savoirfairelinux.com>2017-01-25 14:02:33 -0500
committerTim Graham <timograham@gmail.com>2017-02-21 11:58:42 -0500
commit5a6f70b4281817656db2f36c5919036d38fcce7f (patch)
tree0fa649e905d960b54c5a65d80be23e42f900c23d /django/core/files/base.py
parent3eb679a86956d9eedf24492f0002de002f7180f5 (diff)
downloaddjango-5a6f70b4281817656db2f36c5919036d38fcce7f.tar.gz
Refs #27656 -- Updated django.core docstring verbs according to PEP 257.
Diffstat (limited to 'django/core/files/base.py')
-rw-r--r--django/core/files/base.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/django/core/files/base.py b/django/core/files/base.py
index 9030ed9155..90b75b18cb 100644
--- a/django/core/files/base.py
+++ b/django/core/files/base.py
@@ -76,7 +76,7 @@ class File(FileProxyMixin):
def multiple_chunks(self, chunk_size=None):
"""
- Returns ``True`` if you can expect multiple chunks.
+ Return ``True`` if you can expect multiple chunks.
NB: If a particular file representation is in memory, subclasses should
always return ``False`` -- there's no good reason to read from memory in
@@ -133,7 +133,7 @@ class File(FileProxyMixin):
class ContentFile(File):
"""
- A File-like object that takes just raw content, rather than an actual file.
+ A File-like object that take just raw content, rather than an actual file.
"""
def __init__(self, content, name=None):
stream_class = StringIO if isinstance(content, str) else BytesIO
@@ -154,21 +154,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 byte string) 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 byte string) 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 byte string) equals '\n'."""
return line == ('\n' if isinstance(line, str) else b'\n')