| Conditions | 2 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 1 |
| CRAP Score | 3.1852 |
| Changes | 0 | ||
| 1 | 1 | from plugin.core.constants import PMS_PATH |
|
| 17 | 1 | @staticmethod |
|
| 18 | def exc_traceback(tb): |
||
| 19 | """Format traceback with relative paths""" |
||
| 20 | tb_list = traceback.extract_tb(tb) |
||
| 21 | |||
| 22 | return ''.join(traceback.format_list([ |
||
| 23 | (os.path.relpath(filename, PMS_PATH), line_num, name, line) |
||
| 24 | for (filename, line_num, name, line) in tb_list |
||
| 25 | ])) |
||
| 50 |
It is generally discouraged to redefine built-ins as this makes code very hard to read.