Mercurial > hg
diff hgext/largefiles/remotestore.py @ 20688:a61ed1c2d7a7
check-code: disallow use of dict(key=value) construction
{} literals are faster and more consistent across Python 2 and 3.
Whitelisted the one use of dict() that is using a generator expresion.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Wed, 12 Mar 2014 13:31:27 -0400 |
parents | cce7ab960312 |
children | 70252bdfd39c |
line wrap: on
line diff
--- a/hgext/largefiles/remotestore.py Wed Mar 12 13:29:29 2014 -0400 +++ b/hgext/largefiles/remotestore.py Wed Mar 12 13:31:27 2014 -0400 @@ -30,7 +30,8 @@ % (source, util.hidepassword(self.url))) def exists(self, hashes): - return dict((h, s == 0) for (h, s) in self._stat(hashes).iteritems()) + return dict((h, s == 0) for (h, s) in # dict-from-generator + self._stat(hashes).iteritems()) def sendfile(self, filename, hash): self.ui.debug('remotestore: sendfile(%s, %s)\n' % (filename, hash)) @@ -97,4 +98,3 @@ def batch(self): '''Support for remote batching.''' return remotebatch(self) -