示例#1
0
文件: __init__.py 项目: xlqian/addok
def resolve_path(name):
    from addok.helpers import import_by_path
    attr = globals()[name]
    for idx, path in enumerate(attr):
        attr[idx] = import_by_path(path)
示例#2
0
def test_import_by_path(input, expected):
    assert import_by_path(input) == expected
示例#3
0
def preprocess():
    # Do not import at load time, because we don't want to have a hard
    # dependency to psycopg2.
    PSQL_PROCESSORS = [import_by_path(path) for path in config.PSQL_PROCESSORS]
    return iter_pipe(None, PSQL_PROCESSORS)
示例#4
0
def preprocess():
    # Do not import at load time, because we don't want to have a hard
    # dependency to psycopg2.
    PSQL_PROCESSORS = [import_by_path(path) for path in config.PSQL_PROCESSORS]
    return iter_pipe(None, PSQL_PROCESSORS)
示例#5
0
def resolve_path(name):
    from addok.helpers import import_by_path
    attr = globals()[name]
    for idx, path in enumerate(attr):
        attr[idx] = import_by_path(path)
示例#6
0
 def resolve_paths(self, key):
     from addok.helpers import import_by_path
     self[key[:-len('_PYPATHS')]] = [
         import_by_path(path) for path in self[key]
     ]
示例#7
0
 def resolve_path(self, key):
     from addok.helpers import import_by_path
     self[key[:-len('_PYPATH')]] = import_by_path(self[key])
示例#8
0
def test_import_by_path(input, expected):
    assert import_by_path(input) == expected
示例#9
0
 def resolve_paths(self, key):
     from addok.helpers import import_by_path
     attr = self[key]
     for idx, path in enumerate(attr):
         attr[idx] = import_by_path(path)