Skip to content

Type mypy/config_parser.py without Any #19566

Open

Description

@wyattscarpenter

We could try to get all the Anys out of mypy/config_parser.py, which would prevent other configuration-file type-error crashes. (We will presumably still error, but could emit a friendlier message, as in #19494 and its GitHub issue.) You know... static typing :)

Semi-related: hukkin/tomli#261

Originally posted by @wyattscarpenter in #19494 (comment)

This might be very easy if the ini parser knows/declares what types it gives us (primarily strings?)... could be prohibitively difficult otherwise, or perhaps best addressed in typeshed stubs. I haven't looked into it much yet; I imagine it will be easiest to investigate with an IDE that does type inference and display, and I'm on a bus right now (the opposite situation).

Activity

  1. changed the title [-]Type mypy/config_parser.py without Any[/-] [+]Type `mypy/config_parser.py` without `Any`[/+] on Aug 2, 2025
  2. added
    topic-developer
    on Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-developer

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions