summaryrefslogtreecommitdiff
path: root/coverage/phystokens.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/phystokens.py')
-rw-r--r--coverage/phystokens.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/coverage/phystokens.py b/coverage/phystokens.py
index fe77c7de..3fd1165c 100644
--- a/coverage/phystokens.py
+++ b/coverage/phystokens.py
@@ -1,6 +1,7 @@
"""Better tokenizing for coverage.py."""
import codecs, keyword, re, sys, token, tokenize
+
from coverage.parser import generate_tokens
@@ -75,6 +76,7 @@ def source_token_lines(source):
is indistinguishable from a final line with a newline.
"""
+
ws_tokens = set([token.INDENT, token.DEDENT, token.NEWLINE, tokenize.NL])
line = []
col = 0
@@ -108,6 +110,7 @@ def source_token_lines(source):
if line:
yield line
+
def source_encoding(source):
"""Determine the encoding for `source` (a string), according to PEP 263.