Content-Length: 269971 | pFad | https://github.com/python/importlib_metadata/issues/434

ad mypy failing · Issue #434 · python/importlib_metadata · GitHub
Skip to content

mypy failing #434

Description

@FFY00

mypy is failing in the tests with the following error

435: error: Incompatible return value type (got "Message", expected "PackageMetadata")  [return-value]
435: note: Following member(s) of "Message" have conflicts:
435: note:     Expected:
435: note:         def [_T] get_all(self, name: str, failobj: _T = ...) -> Union[List[Any], _T]
435: note:     Got:
435: note:         @overload
435: note:         def get_all(self, name: str, failobj: None = ...) -> Optional[List[Any]]
435: note:         @overload
435: note:         def [_T] get_all(self, name: str, failobj: _T) -> Union[List[Any], _T]

The typeshed definitions changed in python/typeshed@b5a26d1, causing PackageMetadata to fall out of sync. I think the right option here is just to bring PackageMetadata back in sync with email.message.Message

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/importlib_metadata/issues/434

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy