Skip to content

Add typings #52

Closed
Closed
@PgBiel

Description

@PgBiel

We should add typings to manim:

  1. It allows for more precise intellisense and easier-to-check code (via mypy and whatnot);
  2. It ensures we follow a structure that makes sense (i.e., ensures we don't have a data model in which people get completely lost);
  3. Writing documentation and specifying types are tied to each other. When we work on documentation, it is inevitable that we will specify types for things, so why not add it to the code as well?

Notes:

  1. We can use stubgen to have a headstart;
  2. We can use stub files in order to keep typings separate from the code and not have to change things much (but this is debatable - please expose your opinions on this);
  3. This is very related to the dataclasses solution proposed in CONFIG dictionaries stuff  #7, and may ultimately be a consequence of it.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions