Skip to content

Inner class can't be used as type #611

@srittau

Description

@srittau

Please consider the following stub file:

class Foo:
    bar: Bar 
    class Bar: ...

pytype 2020.06.01 complains:

third_party/3/test2/__init__.pyi: pytype.pytd.visitors.SymbolLookupError: Couldn't find Bar in test2

As stub files should generally be considered to be using from __future__ import annotations, I believe this should work. (mypy accepts it also.) Easily worked around, so just a minor issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions