Skip to content

Commit d60c54c

Browse files
committed
Fix lint warning on Travis.
1 parent 950b30a commit d60c54c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

vprof/code_heatmap.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,14 @@ def record_line(self, frame, event, arg): # pylint: disable=unused-argument
6868
def lines_without_stdlib(self):
6969
"""Filters code from standard library from self.lines."""
7070
prev_line = None
71+
current_module_path = inspect.getabsfile(inspect.currentframe())
7172
for line_stats in self.lines:
72-
path, _, runtime = line_stats
73+
module_path, _, runtime = line_stats
7374
if not prev_line:
7475
prev_line = line_stats
7576
else:
76-
if (not check_standard_dir(path) and
77-
path != inspect.getabsfile(inspect.currentframe())):
77+
if (not check_standard_dir(module_path) and
78+
module_path != current_module_path):
7879
yield prev_line
7980
prev_line = line_stats
8081
else:
@@ -83,9 +84,9 @@ def lines_without_stdlib(self):
8384

8485
def fill_heatmap(self):
8586
"""Fills code heatmap and execution count dictionaries."""
86-
for path, lineno, runtime in self.lines_without_stdlib:
87-
self._execution_count[path][lineno] += 1
88-
self._heatmap[path][lineno] += runtime
87+
for module_path, lineno, runtime in self.lines_without_stdlib:
88+
self._execution_count[module_path][lineno] += 1
89+
self._heatmap[module_path][lineno] += runtime
8990

9091
@property
9192
def heatmap(self):

0 commit comments

Comments
 (0)