summaryrefslogtreecommitdiff
path: root/coverage/phystokens.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/phystokens.py')
-rw-r--r--coverage/phystokens.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/coverage/phystokens.py b/coverage/phystokens.py
index 7a033ae..92da8d3 100644
--- a/coverage/phystokens.py
+++ b/coverage/phystokens.py
@@ -158,11 +158,9 @@ COOKIE_RE = re.compile(r"^\s*#.*coding[:=]\s*([-\w.]+)", flags=re.MULTILINE)
def _source_encoding_py2(source):
"""Determine the encoding for `source`, according to PEP 263.
- Arguments:
- source (byte string): the text of the program.
+ `source` is a byte string, the text of the program.
- Returns:
- string: the name of the encoding.
+ Returns a string, the name of the encoding.
"""
assert isinstance(source, bytes)
@@ -255,11 +253,9 @@ def _source_encoding_py2(source):
def _source_encoding_py3(source):
"""Determine the encoding for `source`, according to PEP 263.
- Arguments:
- source (byte string): the text of the program.
+ `source` is a byte string: the text of the program.
- Returns:
- string: the name of the encoding.
+ Returns a string, the name of the encoding.
"""
readline = iternext(source.splitlines(True))