File tree Expand file tree Collapse file tree 1 file changed +17
-18
lines changed Expand file tree Collapse file tree 1 file changed +17
-18
lines changed Original file line number Diff line number Diff line change 1
1
from collections .abc import Mapping
2
2
from enum import Enum
3
- from typing import Collection , Dict , List , NamedTuple
3
+ from typing import Collection , Dict , NamedTuple
4
4
5
5
import numpy as np
6
6
from hypothesis import strategies as st
9
9
__all__ = ["mock_dataframes" , "MockDataFrame" , "MockColumn" , "NominalDtypeEnum" ]
10
10
11
11
12
- nominal_numerics : List [str ] = []
13
- for kind in ["int" , "uint" ]:
14
- for bitwidth in [8 , 16 , 32 , 64 ]:
15
- nominal_numerics .append (f"{ kind } { bitwidth } " )
16
- for bitwidth in [32 , 64 ]:
17
- nominal_numerics .append (f"float{ bitwidth } " )
18
-
19
- NominalDtypeEnum = Enum (
20
- "NominalDtypeEnum" ,
21
- {
22
- "BOOL" : "bool" ,
23
- ** {name .upper (): name for name in nominal_numerics },
24
- "UTF8" : "U8" ,
25
- "DATETIME64NS" : "datetime64[ns]" ,
26
- "CATEGORY" : "category" ,
27
- },
28
- )
12
+ class NominalDtypeEnum (Enum ):
13
+ BOOL = "bool"
14
+ UTF8 = "U8"
15
+ DATETIME64NS = "datetime64[ns]"
16
+ CATEGORY = "category"
17
+ # Numerics
18
+ UINT8 = "uint8"
19
+ UINT16 = "uint16"
20
+ UINT32 = "uint32"
21
+ UINT64 = "uint64"
22
+ INT8 = "int8"
23
+ INT16 = "int16"
24
+ INT32 = "int32"
25
+ INT64 = "int64"
26
+ FLOAT32 = "float32"
27
+ FLOAT64 = "float64"
29
28
30
29
31
30
class MockColumn (NamedTuple ):
You can’t perform that action at this time.
0 commit comments