Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 48524:ea13dabbe168
pytype: stop excluding webcommands.py
I have no idea why, but asserting that each value added to `emptydirs` is not
None didn't fix this:
File "/mnt/c/Users/Matt/hg/mercurial/hgweb/webcommands.py", line 621, in dirlist:
Function bytes.join was called with the wrong arguments [wrong-arg-types]
Expected: (self, iterable: Iterable[bytes])
Actually passed: (self, iterable: List[None])
Differential Revision: https://phab.mercurial-scm.org/D11924
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 13 Dec 2021 22:46:43 -0500 |
parents | d4ba4d51f85f |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
48523:8a075b679918 | 48524:ea13dabbe168 |
---|---|
517 | 517 |
518 rev = webcommand(b'rev')(changeset) | 518 rev = webcommand(b'rev')(changeset) |
519 | 519 |
520 | 520 |
521 def decodepath(path): | 521 def decodepath(path): |
522 # type: (bytes) -> bytes | |
522 """Hook for mapping a path in the repository to a path in the | 523 """Hook for mapping a path in the repository to a path in the |
523 working copy. | 524 working copy. |
524 | 525 |
525 Extensions (e.g., largefiles) can override this to remap files in | 526 Extensions (e.g., largefiles) can override this to remap files in |
526 the virtual file system presented by the manifest command below.""" | 527 the virtual file system presented by the manifest command below.""" |
614 | 615 |
615 path = b"%s%s" % (abspath, d) | 616 path = b"%s%s" % (abspath, d) |
616 yield { | 617 yield { |
617 b"parity": next(parity), | 618 b"parity": next(parity), |
618 b"path": path, | 619 b"path": path, |
620 # pytype: disable=wrong-arg-types | |
619 b"emptydirs": b"/".join(emptydirs), | 621 b"emptydirs": b"/".join(emptydirs), |
622 # pytype: enable=wrong-arg-types | |
620 b"basename": d, | 623 b"basename": d, |
621 } | 624 } |
622 | 625 |
623 return web.sendtemplate( | 626 return web.sendtemplate( |
624 b'manifest', | 627 b'manifest', |