diff options
author | loic@dachary.org <loic@dachary.org> | 2017-01-10 22:21:13 +0100 |
---|---|---|
committer | loic@dachary.org <loic@dachary.org> | 2017-01-10 22:21:13 +0100 |
commit | ffc050e243b4c329f582372dd49c55aa225197b9 (patch) | |
tree | c9f02070a1d49402b25680c30f2148fcd2cc7616 /coverage/python.py | |
parent | 6da69c9cfcf8874cc423177a9376e90e27218d1d (diff) | |
download | python-coveragepy-git-ffc050e243b4c329f582372dd49c55aa225197b9.tar.gz |
use the new source_for_file helper where it makes sense
--HG--
branch : issue-426
Diffstat (limited to 'coverage/python.py')
-rw-r--r-- | coverage/python.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/coverage/python.py b/coverage/python.py index 5e142d24..f75be60a 100644 --- a/coverage/python.py +++ b/coverage/python.py @@ -139,13 +139,7 @@ class PythonFileReporter(FileReporter): else: filename = morf - filename = files.unicode_filename(filename) - - # .pyc files should always refer to a .py instead. - if filename.endswith(('.pyc', '.pyo')): - filename = filename[:-1] - elif filename.endswith('$py.class'): # Jython - filename = filename[:-9] + ".py" + filename = source_for_file(files.unicode_filename(filename)) super(PythonFileReporter, self).__init__(files.canonical_filename(filename)) |