google/pasta

Extend scope.analyze to support PEP 484 forward references

soupytwist opened this issue · 0 comments

https://www.python.org/dev/peps/pep-0484/#forward-references

This style of type annotation isn't recognized by scope.analyze right now. The b imported in this module appears to be unused.

# File models/a.py
from models import b
class A(Model):
    def foo(self, b: 'b.B'): ...