comparison mercurial/bundle2.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 290c29df1915
children 4188e75af983
comparison
equal deleted inserted replaced
49646:2a70d1fc70c4 49648:9be765b82a90
1936 assert compression is None 1936 assert compression is None
1937 if cg.version != b'01': 1937 if cg.version != b'01':
1938 raise error.Abort( 1938 raise error.Abort(
1939 _(b'old bundle types only supports v1 changegroups') 1939 _(b'old bundle types only supports v1 changegroups')
1940 ) 1940 )
1941
1942 # HG20 is the case without 2 values to unpack, but is handled above.
1943 # pytype: disable=bad-unpacking
1941 header, comp = bundletypes[bundletype] 1944 header, comp = bundletypes[bundletype]
1945 # pytype: enable=bad-unpacking
1946
1942 if comp not in util.compengines.supportedbundletypes: 1947 if comp not in util.compengines.supportedbundletypes:
1943 raise error.Abort(_(b'unknown stream compression type: %s') % comp) 1948 raise error.Abort(_(b'unknown stream compression type: %s') % comp)
1944 compengine = util.compengines.forbundletype(comp) 1949 compengine = util.compengines.forbundletype(comp)
1945 1950
1946 def chunkiter(): 1951 def chunkiter():