Skip to content

Narrowing not working for inner functions #659

@galah92

Description

@galah92

Summary

Playground link

from collections.abc import Callable

def foo(goo: Callable | None = None):
    if goo is not None:
        def inner():
            goo()

Version

5e02d83

Metadata

Metadata

Assignees

No one assigned

    Labels

    narrowingrelated to flow-sensitive type narrowing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions