Mercurial > hg
changeset 51882:2391a5fa111e
store: fix a signature mismatch for a vfs subclass
This was flagged by PyCharm. I'm not sure why pytype doesn't catch this- it's
not excluded from the modules that are currently checked.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 22 Sep 2024 17:06:31 -0400 |
parents | d62887764687 |
children | 1edac12af730 |
files | mercurial/store.py |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/store.py Sun Sep 22 17:02:42 2024 -0400 +++ b/mercurial/store.py Sun Sep 22 17:06:31 2024 -0400 @@ -14,7 +14,11 @@ import stat import typing -from typing import Generator, List +from typing import ( + Generator, + List, + Optional, +) from .i18n import _ from .thirdparty import attr @@ -1135,11 +1139,13 @@ self.fncache.add(path) return self.vfs(encoded, mode, *args, **kw) - def join(self, path): + def join(self, path: Optional[bytes], *insidef: bytes) -> bytes: + insidef = (self.encode(f) for f in insidef) + if path: - return self.vfs.join(self.encode(path)) + return self.vfs.join(self.encode(path), *insidef) else: - return self.vfs.join(path) + return self.vfs.join(path, *insidef) def register_file(self, path): """generic hook point to lets fncache steer its stew"""