1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-04 05:26:13 +02:00

git-p4: use functools.reduce instead of reduce

For python3, reduce() has been moved to functools.reduce().  This is
also available in python2.7.

Signed-off-by: Yang Zhao <yang.zhao@skyboxlabs.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Yang Zhao 2019-12-13 15:52:44 -08:00 committed by Junio C Hamano
parent 4294d741cc
commit a6b1306735

View File

@ -13,6 +13,7 @@
sys.exit(1)
import os
import optparse
import functools
import marshal
import subprocess
import tempfile
@ -1158,7 +1159,7 @@ def pushFile(self, localLargeFile):
assert False, "Method 'pushFile' required in " + self.__class__.__name__
def hasLargeFileExtension(self, relPath):
return reduce(
return functools.reduce(
lambda a, b: a or b,
[relPath.endswith('.' + e) for e in gitConfigList('git-p4.largeFileExtensions')],
False