@@ -11,23 +11,17 @@ class CIFValuePresenceEnum(IntEnum):
1111
1212
1313class CIFColumn (Protocol ):
14- def get_string (self , row : int ) -> Optional [str ]:
15- ...
14+ def get_string (self , row : int ) -> Optional [str ]: ...
1615
17- def get_integer (self , row : int ) -> int :
18- ...
16+ def get_integer (self , row : int ) -> int : ...
1917
20- def get_float (self , row : int ) -> float :
21- ...
18+ def get_float (self , row : int ) -> float : ...
2219
23- def get_value_presence (self , row : int ) -> CIFValuePresenceEnum :
24- ...
20+ def get_value_presence (self , row : int ) -> CIFValuePresenceEnum : ...
2521
26- def are_values_equal (self , row_a : int , row_b : int ) -> bool :
27- ...
22+ def are_values_equal (self , row_a : int , row_b : int ) -> bool : ...
2823
29- def string_equals (self , row : int , value : str ) -> bool :
30- ...
24+ def string_equals (self , row : int , value : str ) -> bool : ...
3125
3226 def as_ndarray (
3327 self , * , dtype : Optional [Union [np .dtype , str ]] = None , start : Optional [int ] = None , end : Optional [int ] = None
@@ -40,11 +34,9 @@ def as_ndarray(
4034 """
4135 ...
4236
43- def __getitem__ (self , idx : Any ) -> Any :
44- ...
37+ def __getitem__ (self , idx : Any ) -> Any : ...
4538
46- def __len__ (self ) -> int :
47- ...
39+ def __len__ (self ) -> int : ...
4840
4941 @property
5042 def value_presences (self ) -> Optional [np .ndarray ]:
@@ -56,29 +48,23 @@ def value_presences(self) -> Optional[np.ndarray]:
5648
5749class CIFCategory (Protocol ):
5850 @property
59- def name (self ) -> str :
60- ...
51+ def name (self ) -> str : ...
6152
6253 @property
63- def n_rows (self ) -> int :
64- ...
54+ def n_rows (self ) -> int : ...
6555
6656 @property
67- def n_columns (self ) -> int :
68- ...
57+ def n_columns (self ) -> int : ...
6958
7059 @property
71- def field_names (self ) -> List [str ]:
72- ...
60+ def field_names (self ) -> List [str ]: ...
7361
7462 def __getattr__ (self , name : str ) -> CIFColumn :
7563 return self [name ]
7664
77- def __getitem__ (self , name : str ) -> CIFColumn :
78- ...
65+ def __getitem__ (self , name : str ) -> CIFColumn : ...
7966
80- def __contains__ (self , key : str ) -> bool :
81- ...
67+ def __contains__ (self , key : str ) -> bool : ...
8268
8369 # Category Helpers
8470 def get_matrix (self , field : str , rows : int , cols : int , row_index : int ) -> np .ndarray :
@@ -120,19 +106,15 @@ class CIFDataBlock(Protocol):
120106 def __getattr__ (self , name : str ) -> CIFCategory :
121107 return self [name ]
122108
123- def __getitem__ (self , name : str ) -> CIFCategory :
124- ...
109+ def __getitem__ (self , name : str ) -> CIFCategory : ...
125110
126- def __contains__ (self , key : str ):
127- ...
111+ def __contains__ (self , key : str ): ...
128112
129113 @property
130- def header (self ) -> str :
131- ...
114+ def header (self ) -> str : ...
132115
133116 @property
134- def categories (self ) -> Dict [str , CIFCategory ]:
135- ...
117+ def categories (self ) -> Dict [str , CIFCategory ]: ...
136118
137119
138120class CIFFile (Protocol ):
@@ -145,12 +127,10 @@ def __getitem__(self, index_or_name: Union[int, str]) -> CIFDataBlock:
145127 def __getattr__ (self , name : str ) -> CIFDataBlock :
146128 return self [name ]
147129
148- def __len__ (self ) -> int :
149- ...
130+ def __len__ (self ) -> int : ...
150131
151132 def __contains__ (self , key : str ) -> bool :
152133 return key in self ._block_map
153134
154135 @property
155- def data_blocks (self ) -> List [CIFDataBlock ]:
156- ...
136+ def data_blocks (self ) -> List [CIFDataBlock ]: ...
0 commit comments