D7673: util: rename a variable to avoid confusing pytype
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Mon Dec 16 06:32:27 UTC 2019
Closed by commit rHGeff050dbb703: util: rename a variable to avoid confusing pytype (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7673?vs=18737&id=18749
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7673/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7673
AFFECTED FILES
mercurial/util.py
CHANGE DETAILS
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -1195,12 +1195,12 @@
'''cache the result of function calls'''
# XXX doesn't handle keywords args
if func.__code__.co_argcount == 0:
- cache = []
+ listcache = []
def f():
- if len(cache) == 0:
- cache.append(func())
- return cache[0]
+ if len(listcache) == 0:
+ listcache.append(func())
+ return listcache[0]
return f
cache = {}
To: mharbison72, #hg-reviewers, pulkit
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list