diff --git a/news/2905cccb-2fe8-4b0d-8734-303510a7e4ce.trivial.rst b/news/2905cccb-2fe8-4b0d-8734-303510a7e4ce.trivial.rst new file mode 100644 index 000000000..e69de29bb diff --git a/src/pip/_internal/vcs/bazaar.py b/src/pip/_internal/vcs/bazaar.py index ee78b5d27..6af3e35ff 100644 --- a/src/pip/_internal/vcs/bazaar.py +++ b/src/pip/_internal/vcs/bazaar.py @@ -96,6 +96,7 @@ class Bazaar(VersionControl): @classmethod def get_revision(cls, location): + # type: (str) -> str revision = cls.run_command( ['revno'], cwd=location, ) diff --git a/src/pip/_internal/vcs/git.py b/src/pip/_internal/vcs/git.py index e540e02dd..88a56d6ad 100644 --- a/src/pip/_internal/vcs/git.py +++ b/src/pip/_internal/vcs/git.py @@ -345,6 +345,7 @@ class Git(VersionControl): @classmethod def get_revision(cls, location, rev=None): + # type: (str, Optional[str]) -> str if rev is None: rev = 'HEAD' current_rev = cls.run_command( diff --git a/src/pip/_internal/vcs/mercurial.py b/src/pip/_internal/vcs/mercurial.py index e7988d1ac..98c288864 100644 --- a/src/pip/_internal/vcs/mercurial.py +++ b/src/pip/_internal/vcs/mercurial.py @@ -97,6 +97,7 @@ class Mercurial(VersionControl): @classmethod def get_revision(cls, location): + # type: (str) -> str """ Return the repository-local changeset revision number, as an integer. """ diff --git a/src/pip/_internal/vcs/subversion.py b/src/pip/_internal/vcs/subversion.py index b6b7010bf..0582ab0c7 100644 --- a/src/pip/_internal/vcs/subversion.py +++ b/src/pip/_internal/vcs/subversion.py @@ -49,6 +49,7 @@ class Subversion(VersionControl): @classmethod def get_revision(cls, location): + # type: (str) -> str """ Return the maximum revision for all files under a given location """ @@ -73,7 +74,7 @@ class Subversion(VersionControl): dirs[:] = [] continue # not part of the same svn tree, skip it revision = max(revision, localrev) - return revision + return str(revision) @classmethod def get_netloc_and_auth(cls, netloc, scheme):