facebook / pyre-check

Performant type-checking for python.
https://pyre-check.org/
MIT License
6.85k stars 437 forks source link

Guard use of `dict[str, str]` for Python 3.8 #844

Closed stroxler closed 5 months ago

stroxler commented 6 months ago

Summary: Github tests caught another too-new-to-use feature in our Python code: you cannot directly subscript builtin containers like dict until 3.9.

In this case since there's no runtime need for the annotation, we can use from __future__ import annotations to work around the problem.

Differential Revision: D56821982

stroxler commented 5 months ago

The fix was landed, not sure why the PR didn't auto-close