Pytype

Latest version: v2024.10.11

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

Scan your dependencies

Page 2 of 34

2024.02.13

Bug fixes:
* Fix: pytype.single -> pytype.main.
* Catch UnicodeDecodeError when attempting to read excluded files.
* Add protocol overload to definition of builtins.divmod.

2024.02.09

Updates:
* Remove 'deep' and 'store_all_calls' options.
* Remove duplicate pytype inputs and outputs.

Bug fixes:
* Fix module resolution bug in load_pytd.
* Pattern matching:
* Fix a corner case in pattern matching where the first case is None.
* Fix a corner case when comparing to Any in a case statement.
* Fix a false redundant-match when matching instances of a nonexhaustive type.
* Do not attempt to track matching if we don't recognise a CMP as an instance.
* Do not attempt to track matches if the match variable contains an Any.
* Rework the check for an out-of-order opcode in a match block.
* Fix a crash when calling get() on a TypedDict instance.
* Don't crash when inferring a type for an uncalled attrs.define.
* Handle aliased imports in type stubs better.
* Teach pytype that zip is actually a class.
* Catch bad external types in type annotations.

2024.01.24

Updates:
* Stop doing suboptimal line number adjustment for 3.10/3.11 consistency.

Bug fixes:
* Fix a couple of --none-is-not-bool issues.
* --bind-decorated-methods: Don't treat SimpleFunction as a full-fledged method.
* Fix bad matching of typing.Self against other TypeVars.
* Don't do attr-demangling on non-attr classes.
* Fix interaction between signature compatibility checks and typing.Self.
* Fix [invalid-function-definition] error caused by ignoring
dataclasses.KW_ONLY.
* Report an error when a TypedDict key has an ambiguous type.
* Fix bug caused by bad ParameterizedClass hashing.
* Make sure we consistently use the same `dict` class for types.
* Don't raise MissingParameter on keyword-only params when **kwargs is present.

2024.01.05

Updates:
* Support typing.Required and typing.NotRequired.
* Detect bad calls to `dataclasses.replace`.

Bug fixes:
* Do not crash if we encounter a malformed splat in a constant list.
* Allow ParamSpecs as generic class parameters.
* Fix crash caused by incorrect assumption about the type of an ast node.
* Allow NoReturn to match anything in override checks.
* Expand the types that `dict.__ior__` accepts.

2023.12.18

Bug fixes:
* Prevent `ChainMap`, `Counter` and `OrderedDict` from being dropped if they're
only imported.
* Fix matching against a plain fiddle.Config in pyi signatures.
* Remove no-longer-necessary `__getattribute__`s from enum.pytd.
* Resolve attribute access on Any constants in pytd to just the constant.
* Don't let `typing` be treated as a replaceable Any.
* FIX: Only call match_fiddle_instance_against_bare_type if we have a fiddle
instance.

2023.12.08

Bug fixes:
* Fix a crash with nested pattern matches.
* Allow typing.Unpack to be parameterized.

Page 2 of 34

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.