diff options
| author | Aymeric Augustin | 2013-10-26 17:44:41 +0200 |
|---|---|---|
| committer | Aymeric Augustin | 2013-10-26 17:44:41 +0200 |
| commit | cd1864026c62163c05fe5e22d964884d7b28afaa (patch) | |
| tree | 3aef3a4030dd68f1b9c55e800c0344fcd36ef8d9 /debug_toolbar/panels/profiling.py | |
| parent | ba9f739620d4955aabf112850122345828402f2b (diff) | |
| download | django-debug-toolbar-cd1864026c62163c05fe5e22d964884d7b28afaa.tar.bz2 | |
Eliminate almost all flake8 messages.
Diffstat (limited to 'debug_toolbar/panels/profiling.py')
| -rw-r--r-- | debug_toolbar/panels/profiling.py | 23 |
1 files changed, 13 insertions, 10 deletions
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('<span class="path">{0}/</span><span class="file">{1}</span> in <span class="func">{3}</span>(<span class="lineno">{2}</span>)'.format( - file_path, - file_name, - line_num, - method, - )) + return mark_safe( + '<span class="path">{0}/</span>' + '<span class="file">{1}</span>' + ' in <span class="func">{3}</span>' + '(<span class="lineno">{2}</span>)'.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() |
