| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Python 3.9 and 3.10 reject a bare ClassVar while evaluating a ForwardRef, so get_type_hints() raises for postponed annotations. Evaluate class annotations through the newer class-aware path and allow the bare ClassVar special form, with coverage for inherited hints. Fixes python#643
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #782 +/- ##
=======================================
Coverage 97.26% 97.27%
=======================================
Files 3 3
Lines 7860 7885 +25
=======================================
+ Hits 7645 7670 +25
Misses 215 215
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
On Python 3.9 and 3.10, get_type_hints() treats a stringified bare ClassVar as a forward reference and rejects it with TypeError. This backports the class-aware evaluation behavior for ClassVar and adds coverage for inherited annotations.
Fixes #643.