Cython API: removed unnecessary imports

This commit is contained in:
Celine Mercier
2017-04-21 11:51:05 +02:00
parent 2f0c4b90d7
commit ab0d08293e
7 changed files with 18 additions and 18 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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, \