Skip to content

Type hints: Summary issue #2951

Closed
Closed

Description

Currently, Altair only has a few type hints to help IDEs provide better autocompletion suggestions. More type hints would further help IDEs provide a better development experience as well as static type checkers to catch potential errors before they appear at runtime. Especially applications (e.g. a company-internal web application) and frameworks (e.g. Streamlit, Great Expectations) which want to tightly integrate with Altair could greatly profit from this.

I'd suggest the following approach for Altair which is in line with Using mypy with an existing codebase. Very open for inputs!

Should happen before the v5 release

v5 or minor release

I think it's preferable to have the following items more or less bundled into one release from which on Altair is declared as a library supporting type checks. This could be a minor release (5.1?) as it should not affect any runtime behaviour. Goal is to have as much as possible of the "public API" of Altair typed and then incrementally do the rest later on if we see value in it.

@mattijn @joelostblom Would you be open to this? Input on the release cycle? I could review PRs related to this topic and create some myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      API ergonomics

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions