danepitkin commented on code in PR #34894:
URL: https://github.com/apache/arrow/pull/34894#discussion_r1160104485


##########
python/pyarrow/types.py:
##########
@@ -54,351 +56,165 @@ def is_null(t):
     return t.id == lib.Type_NA
 
 
+@doc(is_null, datatype="boolean")
 def is_boolean(t):
-    """
-    Return True if value is an instance of a boolean type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_BOOL
 
 
+@doc(is_null, datatype="integer")
 def is_integer(t):
-    """
-    Return True if value is an instance of any integer type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id in _INTEGER_TYPES
 
 
+@doc(is_null, datatype="signed integer")
 def is_signed_integer(t):
-    """
-    Return True if value is an instance of any signed integer type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id in _SIGNED_INTEGER_TYPES
 
 
+@doc(is_null, datatype="unsigned integer")
 def is_unsigned_integer(t):
-    """
-    Return True if value is an instance of any unsigned integer type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id in _UNSIGNED_INTEGER_TYPES
 
 
+@doc(is_null, datatype="int8")
 def is_int8(t):
-    """
-    Return True if value is an instance of an int8 type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_INT8
 
 
+@doc(is_null, datatype="int16")
 def is_int16(t):
-    """
-    Return True if value is an instance of an int16 type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_INT16
 
 
+@doc(is_null, datatype="int32")
 def is_int32(t):
-    """
-    Return True if value is an instance of an int32 type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_INT32
 
 
+@doc(is_null, datatype="int64")
 def is_int64(t):
-    """
-    Return True if value is an instance of an int64 type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_INT64
 
 
+@doc(is_null, datatype="uint8")
 def is_uint8(t):
-    """
-    Return True if value is an instance of an uint8 type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_UINT8
 
 
+@doc(is_null, datatype="uint16")
 def is_uint16(t):
-    """
-    Return True if value is an instance of an uint16 type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_UINT16
 
 
+@doc(is_null, datatype="uint32")
 def is_uint32(t):
-    """
-    Return True if value is an instance of an uint32 type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_UINT32
 
 
+@doc(is_null, datatype="uint64")
 def is_uint64(t):
-    """
-    Return True if value is an instance of an uint64 type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_UINT64
 
 
+@doc(is_null, datatype="floating point numeric")
 def is_floating(t):
-    """
-    Return True if value is an instance of a floating point numeric type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id in _FLOATING_TYPES
 
 
+@doc(is_null, datatype="float16 (half-precision)")
 def is_float16(t):
-    """
-    Return True if value is an instance of a float16 (half-precision) type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_HALF_FLOAT
 
 
+@doc(is_null, datatype="float32 (single precision)")
 def is_float32(t):
-    """
-    Return True if value is an instance of a float32 (single precision) type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_FLOAT
 
 
+@doc(is_null, datatype="float64 (double precision)")
 def is_float64(t):
-    """
-    Return True if value is an instance of a float64 (double precision) type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_DOUBLE
 
 
+@doc(is_null, datatype="list")
 def is_list(t):
-    """
-    Return True if value is an instance of a list type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_LIST
 
 
+@doc(is_null, datatype="large list")
 def is_large_list(t):
-    """
-    Return True if value is an instance of a large list type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_LARGE_LIST
 
 
+@doc(is_null, datatype="fixed size list")
 def is_fixed_size_list(t):
-    """
-    Return True if value is an instance of a fixed size list type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_FIXED_SIZE_LIST
 
 
+@doc(is_null, datatype="struct")
 def is_struct(t):
-    """
-    Return True if value is an instance of a struct type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id == lib.Type_STRUCT
 
 
+@doc(is_null, datatype="union")
 def is_union(t):
-    """
-    Return True if value is an instance of a union type.
-
-    Parameters
-    ----------
-    t : DataType
-    """
     return t.id in _UNION_TYPES
 
 
+@doc(is_null, datatype="nested")

Review Comment:
   I chose `nested type` since it's describing a where the type comes from.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to