From 2b304497bbad3a4a4d84f719a17ea080e4bbf708 Mon Sep 17 00:00:00 2001 From: loic Date: Tue, 10 Jan 2017 22:21:13 +0100 Subject: use the new source_for_file helper where it makes sense --- coverage/python.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'coverage/python.py') diff --git a/coverage/python.py b/coverage/python.py index 5e142d2..f75be60 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)) -- cgit v1.2.1