Skip to content

Type mypy/config_parser.py without Any #19566

@wyattscarpenter

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-developerIssues relevant to mypy developers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions