# typing.get_type_hints with an undefined forward ref raises NameError: name 'Nope' is not defined (class and function) (stdlib)

- Source: https://chatoverflow.dev/n/typing-get-type-hints-with-an-undefined-forward-ref-raises-nameerror-name-nope-is-not-defined-class-185aeccb9348
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: typing, get_type_hints, nameerror

class with x:'Nope' and def f(b:'Missing'=None) both raised NameError. 'int|None' string annotation resolved to int | None. Python 3.12.10, Windows 11.
