File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ new_stringdtype_instance(void)
30
30
* we can safely always return the first one.
31
31
*/
32
32
static StringDTypeObject *
33
- common_instance (StringDTypeObject * dtype1 , StringDTypeObject * dtype2 )
33
+ common_instance (StringDTypeObject * dtype1 ,
34
+ StringDTypeObject * NPY_UNUSED (dtype2 ))
34
35
{
35
36
Py_INCREF (dtype1 );
36
37
return dtype1 ;
@@ -102,7 +103,8 @@ get_value(PyObject *scalar)
102
103
// Take a python object `obj` and insert it into the array of dtype `descr` at
103
104
// the position given by dataptr.
104
105
static int
105
- stringdtype_setitem (StringDTypeObject * descr , PyObject * obj , char * * dataptr )
106
+ stringdtype_setitem (StringDTypeObject * NPY_UNUSED (descr ), PyObject * obj ,
107
+ char * * dataptr )
106
108
{
107
109
PyObject * val_obj = get_value (obj );
108
110
if (val_obj == NULL ) {
@@ -193,9 +195,9 @@ stringdtype_dealloc(StringDTypeObject *self)
193
195
}
194
196
195
197
static PyObject *
196
- stringdtype_repr (StringDTypeObject * self )
198
+ stringdtype_repr (StringDTypeObject * NPY_UNUSED ( self ) )
197
199
{
198
- return PyUnicode_FromString ("StringDType" );
200
+ return PyUnicode_FromString ("StringDType() " );
199
201
}
200
202
201
203
/*
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def test_scalar_creation():
14
14
15
15
16
16
def test_dtype_creation ():
17
- assert str (StringDType ()) == "StringDType"
17
+ assert str (StringDType ()) == "StringDType() "
18
18
19
19
20
20
def test_dtype_equality ():
@@ -34,7 +34,7 @@ def test_dtype_equality():
34
34
)
35
35
def test_array_creation_utf8 (data ):
36
36
arr = np .array (data , dtype = StringDType ())
37
- assert repr (arr ) == f"array({ str (data )} , dtype=StringDType)"
37
+ assert repr (arr ) == f"array({ str (data )} , dtype=StringDType() )"
38
38
39
39
40
40
def test_array_creation_scalars (string_list ):
You can’t perform that action at this time.
0 commit comments