Open steverep opened 1 month ago
Seems like the add_type
method is missing from typeshed:
https://github.com/python/typeshed/blob/6a9b53e719a139c2d6b41cf265ed0990cf438192/stdlib/mimetypes.pyi#L42
Hello! Thanks for the report.
As @tomasr8 said, type checking error is coming from the fact that Mimetypes.add_type
isn't defined in the typeshed stubs. Actually, yes, we need to update our docs to add this method. Would you like to send a pull request?
FYI, here's the PR for typeshed: https://github.com/python/typeshed/pull/12329
I'm working on this during EuroPython 2024 sprint.
I'm working on this during EuroPython 2024 sprint.
Fixed in #121665.
@Eclips4 has this issue been fixed? if not I would like to be assignedd
@Eclips4 has this issue been fixed? if not I would like to be assignedd
There's an existing PR which solves the issue: #121665. We're just waiting for someone with ability to merge it.
Aah nice 👍🙂
Bug report
Bug description:
The
add_type
method is not defined on the class interface, and also not defined in the RST file for the docs.CPython versions tested on:
3.8, 3.9, 3.10, 3.11, 3.12, 3.13, CPython main branch
Operating systems tested on:
Linux, macOS, Windows
Linked PRs