pip/src/pip
Jon Dufresne 0b761a164c Harmonize type signature of VersionControl.get_remote_url() subclasses
In the base class, the signature is defined as:

    type: (str) -> str

Further, the docstring says:

    Raises RemoteNotFoundError if the repository does not have a remote
    url configured.

However, some subclasses were returning None instead of raising
RemoteNotFoundError. This violated the type signature and forced calling
code to handle multiple error paradigms.

Now, all subclasses implement the base's signature.

This allowed simplifying some call sites as they can assume None will
not be returned.

This mismatch was noticed while trying to remove "mypy:
disallow-untyped-defs=False" comments.
2020-12-25 13:45:17 -08:00
..
_internal Harmonize type signature of VersionControl.get_remote_url() subclasses 2020-12-25 13:45:17 -08:00
_vendor Update packaging to version 20.8 2020-12-14 14:12:47 -05:00
__init__.py Bump for development 2020-11-30 11:58:32 +00:00
__main__.py Remove __future__ imports 2020-12-24 08:38:09 -08:00