Cython API: removed unnecessary imports
This commit is contained in:
@ -5,16 +5,16 @@ from ..column cimport register_column_class
|
||||
|
||||
from ...view.view cimport View
|
||||
|
||||
from obitools3.utils cimport str2bytes, bytes2str, tobytes
|
||||
from obitools3.utils cimport tobytes
|
||||
|
||||
from ...capi.obiview cimport obi_view_add_column, \
|
||||
obi_get_bool_with_elt_name_and_col_p_in_view, \
|
||||
from ...capi.obiview cimport obi_get_bool_with_elt_name_and_col_p_in_view, \
|
||||
obi_get_bool_with_elt_idx_and_col_p_in_view, \
|
||||
obi_set_bool_with_elt_name_and_col_p_in_view, \
|
||||
obi_set_bool_with_elt_idx_and_col_p_in_view
|
||||
|
||||
from ...capi.obierrno cimport obi_errno
|
||||
from ...capi.obitypes cimport OBI_BOOL, OBIBool_NA, obibool_t, obitype_t
|
||||
|
||||
from ...capi.obitypes cimport OBI_BOOL, OBIBool_NA, obibool_t
|
||||
|
||||
from cpython.bool cimport PyBool_FromLong
|
||||
|
||||
|
@ -5,7 +5,7 @@ from ..column cimport register_column_class
|
||||
|
||||
from ...view.view cimport View
|
||||
|
||||
from obitools3.utils cimport str2bytes, bytes2str, tobytes
|
||||
from obitools3.utils cimport tobytes
|
||||
|
||||
from ...capi.obiview cimport obi_get_char_with_elt_name_and_col_p_in_view, \
|
||||
obi_get_char_with_elt_idx_and_col_p_in_view, \
|
||||
@ -13,7 +13,8 @@ from ...capi.obiview cimport obi_get_char_with_elt_name_and_col_p_in_view, \
|
||||
obi_set_char_with_elt_idx_and_col_p_in_view
|
||||
|
||||
from ...capi.obierrno cimport obi_errno
|
||||
from ...capi.obitypes cimport OBI_CHAR, OBIChar_NA, obichar_t, obitype_t
|
||||
|
||||
from ...capi.obitypes cimport OBI_CHAR, OBIChar_NA, obichar_t
|
||||
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@ from ..column cimport register_column_class
|
||||
|
||||
from ...view.view cimport View
|
||||
|
||||
from obitools3.utils cimport str2bytes, bytes2str, tobytes
|
||||
from obitools3.utils cimport tobytes
|
||||
|
||||
from ...capi.obiview cimport obi_get_float_with_elt_name_and_col_p_in_view, \
|
||||
obi_get_float_with_elt_idx_and_col_p_in_view, \
|
||||
@ -13,7 +13,8 @@ from ...capi.obiview cimport obi_get_float_with_elt_name_and_col_p_in_view, \
|
||||
obi_set_float_with_elt_idx_and_col_p_in_view
|
||||
|
||||
from ...capi.obierrno cimport obi_errno
|
||||
from ...capi.obitypes cimport OBI_FLOAT, OBIFloat_NA, obifloat_t, obitype_t
|
||||
|
||||
from ...capi.obitypes cimport OBI_FLOAT, OBIFloat_NA, obifloat_t
|
||||
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@ from ..column cimport register_column_class
|
||||
|
||||
from ...view.view cimport View
|
||||
|
||||
from obitools3.utils cimport str2bytes, bytes2str, tobytes
|
||||
from obitools3.utils cimport tobytes
|
||||
|
||||
from ...capi.obiview cimport obi_get_int_with_elt_name_and_col_p_in_view, \
|
||||
obi_get_int_with_elt_idx_and_col_p_in_view, \
|
||||
@ -13,7 +13,7 @@ from ...capi.obiview cimport obi_get_int_with_elt_name_and_col_p_in_view, \
|
||||
obi_set_int_with_elt_idx_and_col_p_in_view
|
||||
|
||||
from ...capi.obierrno cimport obi_errno
|
||||
from ...capi.obitypes cimport OBI_INT, OBIInt_NA, obiint_t, obitype_t
|
||||
from ...capi.obitypes cimport OBI_INT, OBIInt_NA, obiint_t
|
||||
|
||||
from cpython.int cimport PyInt_FromLong
|
||||
|
||||
|
@ -5,7 +5,7 @@ from ..column cimport register_column_class
|
||||
|
||||
from ...view.view cimport View
|
||||
|
||||
from obitools3.utils cimport str2bytes, bytes2str, tobytes
|
||||
from obitools3.utils cimport tobytes, bytes2str
|
||||
|
||||
from ...capi.obiview cimport obi_get_qual_char_with_elt_name_and_col_p_in_view, \
|
||||
obi_get_qual_char_with_elt_idx_and_col_p_in_view, \
|
||||
@ -17,10 +17,10 @@ from ...capi.obiview cimport obi_get_qual_char_with_elt_name_and_col_p_in_view,
|
||||
obi_set_qual_int_with_elt_idx_and_col_p_in_view
|
||||
|
||||
from ...capi.obierrno cimport obi_errno
|
||||
|
||||
from ...capi.obitypes cimport OBI_QUAL, OBIQual_char_NA, OBIQual_int_NA, const_char_p
|
||||
|
||||
from libc.stdlib cimport free
|
||||
from libc.string cimport strcmp
|
||||
from libc.stdint cimport uint8_t
|
||||
from libc.stdlib cimport malloc
|
||||
|
||||
@ -97,10 +97,7 @@ cdef class Column_qual(Column):
|
||||
if obi_set_qual_char_with_elt_idx_and_col_p_in_view(self._view.pointer(), self.pointer(), line_nb, 0, OBIQual_char_NA) < 0:
|
||||
raise Exception("Problem setting a value in a column")
|
||||
else :
|
||||
if type(value) == str:
|
||||
value_b = str2bytes(value)
|
||||
else :
|
||||
value_b = value
|
||||
value_b = tobytes(value)
|
||||
if obi_set_qual_char_with_elt_idx_and_col_p_in_view(self._view.pointer(), self.pointer(), line_nb, 0, value_b) < 0:
|
||||
raise Exception("Problem setting a value in a column")
|
||||
|
||||
|
@ -5,7 +5,7 @@ from ..column cimport register_column_class
|
||||
|
||||
from ...view.view cimport View
|
||||
|
||||
from obitools3.utils cimport str2bytes, bytes2str, tobytes
|
||||
from obitools3.utils cimport tobytes
|
||||
|
||||
from ...capi.obiview cimport obi_get_seq_with_elt_name_and_col_p_in_view, \
|
||||
obi_get_seq_with_elt_idx_and_col_p_in_view, \
|
||||
@ -13,6 +13,7 @@ from ...capi.obiview cimport obi_get_seq_with_elt_name_and_col_p_in_view, \
|
||||
obi_set_seq_with_elt_idx_and_col_p_in_view
|
||||
|
||||
from ...capi.obierrno cimport obi_errno
|
||||
|
||||
from ...capi.obitypes cimport OBI_SEQ, OBISeq_NA
|
||||
|
||||
from libc.stdlib cimport free
|
||||
|
@ -5,7 +5,7 @@ from ..column cimport register_column_class
|
||||
|
||||
from ...view.view cimport View
|
||||
|
||||
from obitools3.utils cimport str2bytes, bytes2str, tobytes
|
||||
from obitools3.utils cimport tobytes
|
||||
|
||||
from ...capi.obiview cimport obi_get_str_with_elt_name_and_col_p_in_view, \
|
||||
obi_get_str_with_elt_idx_and_col_p_in_view, \
|
||||
|
Reference in New Issue
Block a user