diff --git a/docs/annotated_types.md b/docs/annotated_types.md index a789391e..b00a11ed 100644 --- a/docs/annotated_types.md +++ b/docs/annotated_types.md @@ -38,6 +38,9 @@ def caller(i: int) -> None: takes_gt_5(i) # accepted ``` +Similarly, pyanalyze infers the `MinLen` and `MaxLen` attributes after checks +on `len()`. + For the `MultipleOf` check, pyanalyze follows Python semantics: values are accepted if `value % multiple_of == 0`. diff --git a/docs/changelog.md b/docs/changelog.md index 2ab0d3d2..44bdd4bb 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,8 +1,9 @@ # Changelog -## Unreleased +## Version 0.11.0 (October 3, 2023) -- Partial support for PEP 695-style type aliases (#690, #692) +- Partial support for PEP 695-style type aliases. Scoping changes + are not yet fully implemented. (#690, #692) - Fix tests to account for new `typeshed_client` release (#694) - Add option to disable all error codes (#659) diff --git a/docs/typesystem.md b/docs/typesystem.md index 5a96e409..bbb2d9aa 100644 --- a/docs/typesystem.md +++ b/docs/typesystem.md @@ -295,6 +295,7 @@ Although pyanalyze aims to support the full Python type system, support for some - Variance of TypeVars - `NewType` over non-trivial types - `ParamSpec` (PEP 612) +- `TypeVarTuple` (PEP 646) More generally, Python is sufficiently dynamic that almost any check like the ones run by pyanalyze will inevitably have false positives: cases where the script sees an error, but the code in fact runs fine. Attributes may be added at runtime in hard-to-detect ways, variables may be created by direct manipulation of the `globals()` dictionary, and the `unittest.mock` module can change anything into anything. Although pyanalyze has a number of configuration mechanisms to deal with these false positives, it is usually better to write code in a way that doesn't require use of these knobs: code that's easier for the script to understand is probably also easier for humans to understand. diff --git a/setup.py b/setup.py index 6a472153..dd02fa07 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup -version = "0.10.1" +version = "0.11.0" package_data = ["test.toml", "stubs/*/*.pyi"]