Skip to content

MimeTypes.add_type() is missing from the docs #121658

Closed

Description

@steverep

Bug report

Bug description:

from mimetypes import MimeTypes

m = MimeTypes()
m.add_type # type checking error

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

Activity

  1. tomasr8 commented on Jul 13, 2024

    @tomasr8
    Member
  2. Eclips4 commented on Jul 13, 2024

    @Eclips4
    Member

    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?

  3. added
    docsDocumentation in the Doc dir
    3.12only security fixes
    3.13only security fixes
    3.14bugs and security fixes
    and removed
    type-bugAn unexpected behavior, bug, or error
    on Jul 13, 2024
  4. Eclips4 commented on Jul 13, 2024

    @Eclips4
    Member

    FYI, here's the PR for typeshed: python/typeshed#12329

  5. changed the title [-]MimeTypes.add_type() missing from types and docs[/-] [+]MimeTypes.add_type() is missing from the docs[/+] on Jul 13, 2024
  6. stinovlas commented on Jul 13, 2024

    @stinovlas
    Contributor

    I'm working on this during EuroPython 2024 sprint.

  7. added a commit that references this issue on Jul 13, 2024
  8. stinovlas commented on Jul 13, 2024

    @stinovlas
    Contributor

    I'm working on this during EuroPython 2024 sprint.

    Fixed in #121665.

  9. added 2 commits that reference this issue on Jul 13, 2024
  10. RafaelJohn9 commented on Aug 14, 2024

    @RafaelJohn9

    @Eclips4 has this issue been fixed? if not I would like to be assignedd

  11. Eclips4 commented on Aug 14, 2024

    @Eclips4
    Member

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

  12. RafaelJohn9 commented on Aug 14, 2024

    @RafaelJohn9

    Aah nice 👍🙂

  13. added a commit that references this issue on Aug 22, 2024
  14. hugovk commented on Nov 6, 2024

    @hugovk
    Member

    Was added in #122301, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.12only security fixes3.13only security fixes3.14bugs and security fixesdocsDocumentation in the Doc direasy

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions