Releases: agronholm/typeguard
Releases · agronholm/typeguard
4.4.1
- Dropped Python 3.8 support
- Changed the signature of
typeguard_ignore()
to be compatible withtyping.no_type_check()
(PR by @jolaf) - Avoid creating reference cycles when type checking uniontypes and classes
- Fixed checking of variable assignments involving tuple unpacking (#486)
- Fixed
TypeError
when checking a class againsttype[Self]
(#481) - Fixed checking of protocols on the class level (against
type[SomeProtocol]
) (#498) - Fixed
Self
checks in instance/class methods that have positional-only arguments - Fixed explicit checks of PEP 604 unions against
types.UnionType
(#467) - Fixed checks against annotations wrapped in
NotRequired
not being run unless theNotRequired
is a forward reference (#454)
4.4.0
- Added proper checking for method signatures in protocol checks (#465)
- Fixed basic support for intersection protocols (#490; PR by @antonagestam)
- Fixed protocol checks running against the class of an instance and not the instance itself (this produced wrong results for non-method member checks)
4.3.0
- Added support for checking against static protocols
- Fixed some compatibility problems when running on Python 3.13 (#460; PR by @JelleZijlstra)
- Fixed test suite incompatibility with pytest 8.2 (#461)
- Fixed pytest plugin crashing on pytest version older than v7.0.0 (even if it's just present) (#343)
4.2.1
4.2.0
- 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
fromtyping_extensions
not being recognized as one (#443) - Fixed
typing
types (dict[str, int]
,List[str]
, etc.) not passing checks againsttype
orType
(#432, PR by Yongxin Wang) - Fixed detection of optional fields (
NotRequired[...]
) inTypedDict
when using forward references (#424) - Fixed mapping checks against Django's
MultiValueDict
(#419)
4.1.5
4.1.4
- 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 anif 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 anif 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)