Mercurial > hg-git-serve
diff src/hggit_serve.py @ 10:c2ae14c981e1
fix format and typing issues
| author | Paul Fisher <paul@pfish.zone> |
|---|---|
| date | Mon, 16 Feb 2026 00:25:27 -0500 |
| parents | 5000914da3ff |
| children |
line wrap: on
line diff
--- a/src/hggit_serve.py Mon Feb 16 00:12:57 2026 -0500 +++ b/src/hggit_serve.py Mon Feb 16 00:25:27 2026 -0500 @@ -175,7 +175,9 @@ def write_the_rest() -> t.Iterator[bytes]: with call, rest: # if it's good enough for shutil it's good enough for me - while more := rest.read(shutil.COPY_BUFSIZE): + # technically not in the docs but everybody it + bs = shutil.COPY_BUFSIZE # type: ignore[attr-defined] + while more := rest.read(bs): yield more if perm == _PUSH: _importing_enter(repo) @@ -211,7 +213,7 @@ setattr(repo, _ILEVEL_ATTR, level) -def _is_importing(repo: hgrepo.IRepo) -> None: +def _is_importing(repo: hgrepo.IRepo) -> bool: """Call this to check if you're currently importing.""" return hasattr(repo, _ILEVEL_ATTR)
