Skip to content

Releases: agronholm/typeguard

4.2.1

24 Mar 08:06
Compare
Choose a tag to compare
  • Fixed missing typing_extensions dependency for Python 3.12 (#444)
  • Fixed deprecation warning in the test suite on Python 3.13 (#444)

4.2.0

23 Mar 21:53
Compare
Choose a tag to compare
  • Added support for specifying options for the pytest plugin via pytest config files (#440)
  • Avoid creating reference cycles when type checking unions (PR by Shantanu)
  • Fixed Optional[...] being removed from the AST if it was located within a subscript (#442)
  • Fixed TypedDict from typing_extensions not being recognized as one (#443)
  • Fixed typing types (dict[str, int], List[str], etc.) not passing checks against type or Type (#432, PR by Yongxin Wang)
  • Fixed detection of optional fields (NotRequired[...]) in TypedDict when using forward references (#424)
  • Fixed mapping checks against Django's MultiValueDict (#419)

4.1.5

11 Sep 07:31
Compare
Choose a tag to compare
  • Fixed Callable erroneously rejecting a callable that has the requested amount of positional arguments but they have defaults (#400)
  • Fixed a regression introduced in v4.1.4 where the elements of Literal got quotes removed from them by the AST transformer (#399)

4.1.4

10 Sep 20:01
Compare
Choose a tag to compare
  • Fixed AttributeError where the transformer removed elements from a PEP 604 union (#384)
  • Fixed AttributeError: 'Subscript' object has no attribute 'slice' when encountering an annotation with a subscript containing an ignored type (imported within an if TYPE_CHECKING: block) (#397)
  • Fixed type checking not being skipped when the target is a union (PEP 604 or typing.Union) where one of the elements is an ignored type (shadowed by an argument, variable assignment or an if TYPE_CHECKING import) (#394, #395)
  • Fixed type checking of class instances created in __new__() in cases such as enums where this method is already invoked before the class has finished initializing (#398)