fix debug.format case from more_debug.py example
more cleanup
Showing 1 of 1 files from the diff.
devtools/debug.py
changed.
@@ -310,12 +310,12 @@
Loading
310 | 310 | last_line = None |
|
311 | 311 | ||
312 | 312 | for instr in instructions: # pragma: no branch |
|
313 | - | if instr.starts_line: |
|
314 | - | if instr.opname in {'LOAD_GLOBAL', 'LOAD_NAME'} and instr.argval == func_name: |
|
315 | - | first_line = instr.starts_line |
|
316 | - | elif instr.opname == 'LOAD_GLOBAL' and instr.argval == 'debug': |
|
317 | - | if next(instructions).argval == func_name: |
|
318 | - | first_line = instr.starts_line |
|
313 | + | if ( |
|
314 | + | instr.starts_line |
|
315 | + | and instr.opname in {'LOAD_GLOBAL', 'LOAD_NAME'} |
|
316 | + | and (instr.argval == func_name or (instr.argval == 'debug' and next(instructions).argval == func_name)) |
|
317 | + | ): |
|
318 | + | first_line = instr.starts_line |
|
319 | 319 | if instr.offset == call_frame.f_lasti: |
|
320 | 320 | break |
|
321 | 321 |
Files | Coverage |
---|---|
devtools | 100.00% |
Project Totals (5 files) | 100.00% |
187420425
PYTHON=3.6 EXTRAS=no OS=macos
187420425
PYTHON=3.7 EXTRAS=yes OS=macos
187420425
PYTHON=3.7 EXTRAS=no OS=macos
187420425
PYTHON=3.7 EXTRAS=yes OS=windows
187417757
PYTHON=3.6 EXTRAS=yes OS=macos
187417757
PYTHON=3.6 EXTRAS=no OS=macos
187420425
PYTHON=3.6 EXTRAS=no OS=ubuntu
187420425
PYTHON=3.6 EXTRAS=yes OS=macos
187420425
PYTHON=3.7 EXTRAS=no OS=windows
187420425
PYTHON=3.8 EXTRAS=yes OS=windows
187432057
PYTHON=3.7 EXTRAS=no OS=ubuntu
187417757
PYTHON=3.8 EXTRAS=no OS=ubuntu
187417757
PYTHON=3.8 EXTRAS=yes OS=ubuntu
187417757
PYTHON=3.7 EXTRAS=no OS=ubuntu
187417757
PYTHON=3.7 EXTRAS=yes OS=ubuntu
187417757
PYTHON=3.6 EXTRAS=no OS=ubuntu
187417757
PYTHON=3.6 EXTRAS=yes OS=ubuntu
187417757
PYTHON=3.7 EXTRAS=no OS=macos
187417757
PYTHON=3.7 EXTRAS=yes OS=macos
187417757
PYTHON=3.7 EXTRAS=no OS=windows
187417757
PYTHON=3.7 EXTRAS=yes OS=windows
187417757
PYTHON=3.8 EXTRAS=no OS=windows
187417757
PYTHON=3.6 EXTRAS=yes OS=windows
187417757
PYTHON=3.8 EXTRAS=yes OS=macos
187417757
PYTHON=3.8 EXTRAS=yes OS=windows
187432057
PYTHON=3.8 EXTRAS=no OS=ubuntu
187432057
PYTHON=3.6 EXTRAS=no OS=ubuntu
187420425
PYTHON=3.7 EXTRAS=yes OS=ubuntu
187417757
PYTHON=3.6 EXTRAS=no OS=windows
187420425
PYTHON=3.8 EXTRAS=yes OS=ubuntu
187420425
PYTHON=3.7 EXTRAS=no OS=ubuntu
187420425
PYTHON=3.8 EXTRAS=no OS=ubuntu
187420425
PYTHON=3.6 EXTRAS=yes OS=ubuntu
187420425
PYTHON=3.6 EXTRAS=yes OS=windows
187420425
PYTHON=3.8 EXTRAS=no OS=windows
187432057
PYTHON=3.7 EXTRAS=yes OS=ubuntu
187432057
PYTHON=3.8 EXTRAS=yes OS=ubuntu
187432057
PYTHON=3.6 EXTRAS=yes OS=ubuntu
187420425
PYTHON=3.8 EXTRAS=no OS=macos
187420425
PYTHON=3.8 EXTRAS=yes OS=macos
187420425
PYTHON=3.6 EXTRAS=no OS=windows
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.