comparison hgext/sparse.py @ 49884:2b8ead6bbb77 stable

sparse: fix a py2 based usage of `map()` In a local pytype run, this fixes: File "/mnt/c/Users/Matt/hg/hgext/sparse.py", line 386, in debugsparse: unsupported operand type(s) for item retrieval: 'fcounts: Iterator[int]' and '0: int' [unsupported-operands] No attribute '__getitem__' on 'fcounts: Iterator[int]' File "/mnt/c/Users/Matt/hg/hgext/sparse.py", line 387, in debugsparse: unsupported operand type(s) for item retrieval: 'fcounts: Iterator[int]' and '1: int' [unsupported-operands] No attribute '__getitem__' on 'fcounts: Iterator[int]' File "/mnt/c/Users/Matt/hg/hgext/sparse.py", line 388, in debugsparse: unsupported operand type(s) for item retrieval: 'fcounts: Iterator[int]' and '2: int' [unsupported-operands] No attribute '__getitem__' on 'fcounts: Iterator[int]'
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 05 Jan 2023 19:47:35 -0500
parents bd3519dc6741
children 54d3a6dc2426
comparison
equal deleted inserted replaced
49883:e90767a71dc0 49884:2b8ead6bbb77
372 sparse.clearrules(repo, force=force) 372 sparse.clearrules(repo, force=force)
373 373
374 if refresh: 374 if refresh:
375 try: 375 try:
376 wlock = repo.wlock() 376 wlock = repo.wlock()
377 fcounts = map( 377 fcounts = pycompat.maplist(
378 len, 378 len,
379 sparse.refreshwdir( 379 sparse.refreshwdir(
380 repo, repo.status(), sparse.matcher(repo), force=force 380 repo, repo.status(), sparse.matcher(repo), force=force
381 ), 381 ),
382 ) 382 )