24
24
from public import public
25
25
from typing_extensions import Self , get_args , get_origin
26
26
27
+ from ibis import util
27
28
from ibis .common .annotations import attribute
28
29
from ibis .common .collections import FrozenOrderedDict , MapSet
29
30
from ibis .common .dispatch import lazy_singledispatch
@@ -189,12 +190,6 @@ def column(self): ...
189
190
def _pretty_piece (self ) -> str :
190
191
return ""
191
192
192
- # TODO(kszucs): should remove it, only used internally
193
- @property
194
- def name (self ) -> str :
195
- """Return the name of the data type."""
196
- return self .__class__ .__name__
197
-
198
193
@classmethod
199
194
def __coerce__ (cls , value , ** kwargs ):
200
195
if isinstance (value , cls ):
@@ -209,7 +204,8 @@ def __call__(self, **kwargs):
209
204
210
205
def __str__ (self ) -> str :
211
206
prefix = "!" * (not self .nullable )
212
- return f"{ prefix } { self .name .lower ()} { self ._pretty_piece } "
207
+ name = self .__class__ .__name__ .lower ()
208
+ return f"{ prefix } { name } { self ._pretty_piece } "
213
209
214
210
def equals (self , other : DataType ) -> bool :
215
211
if not isinstance (other , DataType ):
@@ -962,7 +958,8 @@ def __getitem__(self, key: str) -> DataType:
962
958
return self .fields [key ]
963
959
964
960
def __repr__ (self ) -> str :
965
- return f"'{ self .name } ({ list (self .items ())} , nullable={ self .nullable } )"
961
+ name = self .__class__ .__name__
962
+ return f"'{ name } ({ list (self .items ())} , nullable={ self .nullable } )"
966
963
967
964
@property
968
965
def _pretty_piece (self ) -> str :
0 commit comments