diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-15 17:53:24 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-15 17:53:24 -0500 |
commit | 7bdce80a45920e3888ac0366fdbfb54c6604eba6 (patch) | |
tree | 7fe9a9a28931e25d0cc93ea5b27c80ec07951724 /coverage/phystokens.py | |
parent | 47da566616f14caad010da58f4899a58ebc0b4ae (diff) | |
download | python-coveragepy-git-7bdce80a45920e3888ac0366fdbfb54c6604eba6.tar.gz |
Tabs are 8 spaces, as the Python docs dictate. Fixes issue #31.
Diffstat (limited to 'coverage/phystokens.py')
-rw-r--r-- | coverage/phystokens.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coverage/phystokens.py b/coverage/phystokens.py index 7eebb8ad..2862490f 100644 --- a/coverage/phystokens.py +++ b/coverage/phystokens.py @@ -71,7 +71,7 @@ def source_token_lines(source): ws_tokens = [token.INDENT, token.DEDENT, token.NEWLINE, tokenize.NL] line = [] col = 0 - tokgen = tokenize.generate_tokens(StringIO(source).readline) + tokgen = tokenize.generate_tokens(StringIO(source.expandtabs(8)).readline) for ttype, ttext, (_, scol), (_, ecol), _ in phys_tokens(tokgen): mark_start = True for part in re.split('(\n)', ttext): |