Total Complexity | 2 |
Total Lines | 10 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import warnings |
||
2 | |||
3 | |||
4 | # https://stackoverflow.com/questions/2187269/print-only-the-message-on-warnings |
||
5 | def _warning_setup(): |
||
6 | # pylint: disable=line-too-long |
||
7 | formatwarning_orig = warnings.formatwarning |
||
8 | warnings.formatwarning = lambda message, category, filename, lineno, line=None: \ |
||
9 | formatwarning_orig(message, category, filename, lineno, line='') |
||
10 |