Pytype

Latest version: v2024.4.11

Safety actively analyzes 631311 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 34

2023.04.27

Updates:
* Performance optimizations:
* Cache the `NestedAnnotation.formal` property.
* Speed up `LateAnnotation.__getattribute__`.
* Speed up abstract_utils._isinstance.
* Add support for dataclasses.KW_ONLY.
* Bump networkx version requirement to pick up a matplotlib compatibility fix.

Bug fixes:
* Fix a string manipulation bug in LookupScopedNames.
* Fix a crash in the fiddle overlay when instantiating a function-based config.
* Allow constants as defaults in pyi files.

2023.04.18

Updates:
* Remove pytype's copy of the _ctypes stub.

Bug fixes:
* Remove expensive copy.deepcopy call from the pytd printer.
* Track default (_) cases in match statements in the director.

2023.04.11

Updates:
* Add a block graph visualiser.
* Remove the --always-use-return-annotations flag. Its behavior is now enabled
by default.

Bug fixes:
* Add pattern matching for builtins.
* Keep track of already-seen cases when analysing the same match statement
twice.
* Support `total=False` on imported TypedDicts.
* Use SupportsIndex in some builtins.
* Improve handling of dataclasses and attrs in pyi files.
* Fix inferred yield type for YIELD_FROM opcode.

2023.03.31

Updates:
* Add an overlay for the third party fiddle configuration library.
* Add feature to not replace None with Any when it is the only value.

Bug fixes:
* Fix pattern matching over imported enums.
* Track the variable name for annotated assignments in the director.
* Don't replace late annotations with Any in class definitions.
* Preserve TypedDict instances in TypeVar substitutions.
* Delegate getattr on pyi classmethods and staticmethods to underlying method.
* Support late annotations as parameters for user-defined generic classes.
* Fix a nondeterminism bug in pytype.
* Fix a latent type error in the typing.TypedDict overlay.
* Fix a crash caused by failing to catch [bad-concrete-type].
* Update memview stubs to be closer to API.

2023.03.13

Updates:
* Support abc.abstractclassmethod and abc.abstractstaticmethod.

Bug fixes:
* Look up aliased imports when resolving imported modules.
* Copy typeshed changes to builtins.pyi.
* Fix a pytype crash when encountering a pyi import corner case.

2023.03.08

Updates:
* Add basic query visualization to the CFG visualizer.

Bug fixes:
* Slight fix to wording of non-iterable strings error message.
* Allow TypeVar amd ParamSpec to be passed None for bounds and constraints.
* Handle multiple options for a class's base classes better.
* Don't crash on `from functools import cached_property`.
* Support `__self__` on methods.

Page 6 of 34

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.