Completed
Push — master ( 13dc98...362bd5 )
by Shlomi
25s queued 12s
created

ethically.utils   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A _warning_setup() 0 5 2
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