Skip to content

[ENH]: Add TypedDict (like) type hints to rcParams #28222

@dstansby

Description

@dstansby

Problem

In Python 3.8, typing.TypedDict was added to represent dictionary objects with a specific set of keys: https://typing.readthedocs.io/en/latest/spec/typeddict.html#typeddict. Using a TypedDict allows code editors (in my case VSCode) to offer autocomplete suggestions for keys.

It would be super useful for rcParams if one could e.g., type rcParams["font and get autocomplete suggestions for all the font keys.

This is what it an example looks like in VSCode:
Screenshot 2024-05-14 at 08 58 07

Proposed solution

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy