nptyping.types._object   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A _ObjectMeta.__subclasscheck__() 0 2 1
A _ObjectMeta.__repr__() 0 2 1
1
from typing import Any
2
3
import numpy
4
5
from nptyping.types._nptype import NPType
6
7
8
class _ObjectMeta(type):
9
    def __repr__(cls):
10
        return 'Object'
11
12
    def __subclasscheck__(cls, other: Any) -> bool:
13
        return True
14
15
    __str__ = __repr__
16
    __instancecheck__ = __subclasscheck__
17
18
19
class Object(NPType, numpy.generic, metaclass=_ObjectMeta):
20
    """
21
    Corresponds to numpy.object.
22
    """
23