Passed
Push — master ( 29ab2b...f3ee24 )
by Steve
01:53
created

lagom.util.functional.arity()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 2
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nop 1
crap 1
1 1
import inspect
2 1
from typing import Callable
3
4
5 1
def arity(func: Callable) -> int:
6
    return len(inspect.signature(func).parameters)
7