summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2020-11-29 18:57:05 -0500
committerNed Batchelder <ned@nedbatchelder.com>2020-11-29 19:19:03 -0500
commit9169aeadf5cf9e4fc30cd76ef53c0dff2ec946ef (patch)
treecda0693b9020c97358003d482d1147fd30d78b44
parent4360c9a0e0a2d2b1cefbd77824d4688cd76d0753 (diff)
downloadpython-coveragepy-git-9169aeadf5cf9e4fc30cd76ef53c0dff2ec946ef.tar.gz
Silence previously unreported pylint warnings
-rw-r--r--coverage/pytracer.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/coverage/pytracer.py b/coverage/pytracer.py
index 44bfc8d6..7d7a519b 100644
--- a/coverage/pytracer.py
+++ b/coverage/pytracer.py
@@ -107,7 +107,7 @@ class PyTracer(object):
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
@@ -132,15 +132,15 @@ class PyTracer(object):
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
@@ -227,7 +227,7 @@ class PyTracer(object):
# 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",
)