Skip to content

0.11.0

Compare
Choose a tag to compare
@JelleZijlstra JelleZijlstra released this 04 Oct 02:53
· 89 commits to master since this release
fc3f543
  • 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)
  • Add hacky fix for bugs with hashability on type objects (#689)
  • Show an error on calls to typing.Any (#688)
  • Add command-line option -c/--code to typecheck code from
    the command line (#685)
  • Add a pyanalyze.extensions.EnumName predicate and infer it
    as the value for the .name attribute on enums. Also fix
    type inference for enum "properties" on Python 3.11 and up. (#682)
  • Allow pyanalyze.runtime.is_compatible to be used to narrow
    types (#681, #687)
  • Fix usage of assert_type() with Any and with unions of
    Annotated objects (#680)
  • Support inferring MinLen and MaxLen annotations based
    on len() checks (#680)
  • Expose a convenience API for runtime type checking in the
    pyanalyze.runtime module (#674)
  • Support for annotations from the annotated-types library (#673)
  • Detect undefined attributes on Pydantic models (#670)
  • Remove duplicate "attribute_is_never_set" error for classes
    with predefined attributes (#670)
  • Add hook for overriding the value inferred for attributes on
    literals (#669)
  • Support classes that set a __signature__ attribute to
    define their constructor signature (such as Pydantic models) (#665)
  • Declare support for Python 3.12. Not all new features in
    Python 3.12 are supported yet. (#656)
  • Fix treatment of @property by the incompatible_override
    check (#653)
  • Drop support for Python 3.7 (#654)
  • Add hardcoded support for pytest.raises to avoid false
    positives (#651)
  • Fix crash with nested classes in stubs. For now, Any is
    inferred for such classes (#647)
  • Add disallowed_imports configuration option to disallow
    imports of specific modules (#645, #646)
  • Consider an annotated assignment without a value to be
    an exported name (#644)
  • Improve the location where missing_parameter_annotation
    errors are reported (#643)
  • Add support for suppressing errors in blocks based on
    sys.platform and sys.version_info checks (#641)
  • Fix compatibility between stub-only callable classes
    and the bare Callable annotation (#640)
  • Add new error code missing_generic_parameters (off by
    default) that flags missing parameters to generic types
    such as list (#637)
  • Add new error code reveal_type for reveal_type()
    and similar functions, which previously emitted
    inference_failure (#636)
  • Take into account additional base classes declared in stub
    files (fixing some false positives around typing.IO) (#635, #639)
  • Fix crash on stubs that contain dict or set literals (#634)
  • Remove more old special cases and improve robustness of
    annotation parsing (#630)
  • Remove dependency on typing_inspect (#629)
  • Fix use of Literal types with typing_extensions 4.6.0 (#628)