Skip to content

Commit 9169aea

Browse files
committed
Silence previously unreported pylint warnings
1 parent 4360c9a commit 9169aea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

coverage/pytracer.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _trace(self, frame, event, arg_unused):
107107
if event == 'call':
108108
# Should we start a new context?
109109
if self.should_start_context and self.context is None:
110-
context_maybe = self.should_start_context(frame)
110+
context_maybe = self.should_start_context(frame) # pylint: disable=not-callable
111111
if context_maybe is not None:
112112
self.context = context_maybe
113113
self.started_context = True
@@ -132,15 +132,15 @@ def _trace(self, frame, event, arg_unused):
132132
self.cur_file_name = filename
133133
disp = self.should_trace_cache.get(filename)
134134
if disp is None:
135-
disp = self.should_trace(filename, frame)
136-
self.should_trace_cache[filename] = disp
135+
disp = self.should_trace(filename, frame) # pylint: disable=not-callable
136+
self.should_trace_cache[filename] = disp # pylint: disable=unsupported-assignment-operation
137137

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

0 commit comments

Comments
 (0)