Mercurial > public > mercurial-scm > hg
diff mercurial/bundlecaches.py @ 49648:9be765b82a90
typing: minor tweaks to allow updating to pytype 2022.11.18
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 23 Nov 2022 11:22:22 -0500 |
parents | d89bfc075289 |
children | d68462736492 7b723217d368 |
line wrap: on
line diff
--- a/mercurial/bundlecaches.py Sun Nov 20 22:54:43 2022 -0500 +++ b/mercurial/bundlecaches.py Wed Nov 23 11:22:22 2022 -0500 @@ -5,6 +5,10 @@ import collections +from typing import ( + cast, +) + from .i18n import _ from .thirdparty import attr @@ -247,7 +251,7 @@ # required to apply it. If we see this metadata, compare against what the # repo supports and error if the bundle isn't compatible. if version == b'packed1' and b'requirements' in params: - requirements = set(params[b'requirements'].split(b',')) + requirements = set(cast(bytes, params[b'requirements']).split(b',')) missingreqs = requirements - requirementsmod.STREAM_FIXED_REQUIREMENTS if missingreqs: raise error.UnsupportedBundleSpecification(