Patch the registering function : register_all_column_classes
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
#cython: language_level=3
|
#cython: language_level=3
|
||||||
|
from obitools3.dms.column import typed_column
|
||||||
|
|
||||||
|
|
||||||
__OBIDMS_COLUMN_CLASS__ = {}
|
__OBIDMS_COLUMN_CLASS__ = {}
|
||||||
@ -24,6 +25,8 @@ from obitools3.utils cimport tobytes, \
|
|||||||
bytes2str, \
|
bytes2str, \
|
||||||
str2bytes
|
str2bytes
|
||||||
|
|
||||||
|
from obitools3.dms.column import typed_column
|
||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
import inspect
|
import inspect
|
||||||
import pkgutil
|
import pkgutil
|
||||||
@ -348,8 +351,8 @@ cdef register_column_class(obitype_t obitype,
|
|||||||
cdef register_all_column_classes() :
|
cdef register_all_column_classes() :
|
||||||
|
|
||||||
#obi3 = importlib.import_module("obitools3")
|
#obi3 = importlib.import_module("obitools3")
|
||||||
x = list(pkgutil.walk_packages()) # TODO restrain the walking
|
x = list(pkgutil.walk_packages(typed_column.__path__)) # TODO restrain the walking
|
||||||
all_modules = [importlib.import_module(a[1]) for a in x if a[1].startswith("obitools3.dms.column.typed_column.")]
|
all_modules = [importlib.import_module(a[1]) for a in x]
|
||||||
for mod in all_modules :
|
for mod in all_modules :
|
||||||
getattr(mod, 'register_class')()
|
getattr(mod, 'register_class')()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user