src/eric7/DebugClients/Python/coverage/parser.py

branch
eric7
changeset 9252
32dd11232e06
parent 9209
b99e7fd55fd3
child 9374
ed79209469ad
equal deleted inserted replaced
9251:e0f98cc25bf5 9252:32dd11232e06
375 Uses co_lnotab described in Python/compile.c to find the 375 Uses co_lnotab described in Python/compile.c to find the
376 line numbers. Produces a sequence: l0, l1, ... 376 line numbers. Produces a sequence: l0, l1, ...
377 """ 377 """
378 if hasattr(self.code, "co_lines"): 378 if hasattr(self.code, "co_lines"):
379 for _, _, line in self.code.co_lines(): 379 for _, _, line in self.code.co_lines():
380 if line is not None: 380 if line:
381 yield line 381 yield line
382 else: 382 else:
383 # Adapted from dis.py in the standard library. 383 # Adapted from dis.py in the standard library.
384 byte_increments = self.code.co_lnotab[0::2] 384 byte_increments = self.code.co_lnotab[0::2]
385 line_increments = self.code.co_lnotab[1::2] 385 line_increments = self.code.co_lnotab[1::2]

eric ide

mercurial