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