Skip to content

Commit

Permalink
Silence previously unreported pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Nov 30, 2020
1 parent 4360c9a commit 9169aea
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions coverage/pytracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _trace(self, frame, event, arg_unused):
if event == 'call':
# Should we start a new context?
if self.should_start_context and self.context is None:
context_maybe = self.should_start_context(frame)
context_maybe = self.should_start_context(frame) # pylint: disable=not-callable
if context_maybe is not None:
self.context = context_maybe
self.started_context = True
Expand All @@ -132,15 +132,15 @@ def _trace(self, frame, event, arg_unused):
self.cur_file_name = filename
disp = self.should_trace_cache.get(filename)
if disp is None:
disp = self.should_trace(filename, frame)
self.should_trace_cache[filename] = disp
disp = self.should_trace(filename, frame) # pylint: disable=not-callable
self.should_trace_cache[filename] = disp # pylint: disable=unsupported-assignment-operation

self.cur_file_dict = None
if disp.trace:
tracename = disp.source_filename
if tracename not in self.data:
self.data[tracename] = {}
self.cur_file_dict = self.data[tracename]
if tracename not in self.data: # pylint: disable=unsupported-membership-test
self.data[tracename] = {} # pylint: disable=unsupported-assignment-operation
self.cur_file_dict = self.data[tracename] # pylint: disable=unsubscriptable-object
# The call event is really a "start frame" event, and happens for
# function calls and re-entering generators. The f_lasti field is
# -1 for calls, and a real offset for generators. Use <0 as the
Expand Down Expand Up @@ -227,7 +227,7 @@ def stop(self):
# has changed to None.
dont_warn = (env.PYPY and env.PYPYVERSION >= (5, 4) and self.in_atexit and tf is None)
if (not dont_warn) and tf != self._trace: # pylint: disable=comparison-with-callable
self.warn(
self.warn( # pylint: disable=not-callable
"Trace function changed, measurement is likely wrong: %r" % (tf,),
slug="trace-changed",
)
Expand Down

0 comments on commit 9169aea

Please sign in to comment.