示例#1
0
def run(func, env):
    with errctx(env):
        cache = env['flypy.inference.cache']
        argtypes = env['flypy.typing.argtypes']
        ctx, signature = infer(cache, func, env, argtypes)

        env['flypy.typing.signature'] = signature
        env['flypy.typing.context'] = ctx.context
        env['flypy.typing.constraints'] = ctx.constraints

        if debug_print(func, env) and not env['flypy.state.opaque']:
            print_context(func, env, ctx.context)

        return ctx.func, env
示例#2
0
def run(func, env):
    """
    Turn `convert` ops into calls to coerce().
    """
    with errors.errctx(env):
        lower_coerce(func, env)
示例#3
0
def run(func, env):
    """
    Turn `convert` ops into calls to coerce().
    """
    with errors.errctx(env):
        lower_coerce(func, env)
示例#4
0
def run(func, env):
    from flypy.pipeline import phase

    with errctx(env):
        check_scoping(func, env)
        check_generators(func, env)
示例#5
0
def run(func, env):
    from flypy.pipeline import phase

    with errctx(env):
        check_scoping(func, env)
        check_generators(func, env)