From cd1864026c62163c05fe5e22d964884d7b28afaa Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 26 Oct 2013 17:44:41 +0200 Subject: Eliminate almost all flake8 messages. --- debug_toolbar/panels/profiling.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'debug_toolbar/panels/profiling.py') diff --git a/debug_toolbar/panels/profiling.py b/debug_toolbar/panels/profiling.py index 995cccb..0555f23 100644 --- a/debug_toolbar/panels/profiling.py +++ b/debug_toolbar/panels/profiling.py @@ -69,12 +69,15 @@ class FunctionCall(object): file_path, file_name = file_name.rsplit(os.sep, 1) - return mark_safe('{0}/{1} in {3}({2})'.format( - file_path, - file_name, - line_num, - method, - )) + return mark_safe( + '{0}/' + '{1}' + ' in {3}' + '({2})'.format( + file_path, + file_name, + line_num, + method)) def subfuncs(self): i = 0 @@ -164,7 +167,7 @@ class ProfilingDebugPanel(DebugPanel): self._unwrap_closure_and_profile(cell.cell_contents) def process_view(self, request, view_func, view_args, view_kwargs): - __traceback_hide__ = True + __traceback_hide__ = True # noqa self.profiler = cProfile.Profile() args = (request,) + view_args if DJ_PROFILE_USE_LINE_PROFILER: @@ -184,13 +187,13 @@ class ProfilingDebugPanel(DebugPanel): if func.depth < max_depth: for subfunc in func.subfuncs(): if (subfunc.stats[3] >= cum_time or - (hasattr(self.stats, 'line_stats') and - (subfunc.func in self.stats.line_stats.timings))): + (hasattr(self.stats, 'line_stats') and + (subfunc.func in self.stats.line_stats.timings))): func.has_subfuncs = True self.add_node(func_list, subfunc, max_depth, cum_time=cum_time) def process_response(self, request, response): - __traceback_hide__ = True + __traceback_hide__ = True # noqa if not hasattr(self, 'profiler'): return None self.profiler.create_stats() -- cgit v1.2.3