##// END OF EJS Templates
cleanup: re-run black on the codebase...
Augie Fackler -
r44787:a0ec05d9 default
parent child Browse files
Show More
@@ -291,8 +291,8 b' class branchcache(object):'
291 291 % (
292 292 _branchcachedesc(repo),
293 293 pycompat.bytestr(
294 inst # pytype: disable=wrong-arg-types
295 ),
294 inst
295 ), # pytype: disable=wrong-arg-types
296 296 )
297 297 )
298 298 bcache = None
@@ -1149,8 +1149,8 b' class cgpacker(object):'
1149 1149 if fastpathlinkrev:
1150 1150 assert not tree
1151 1151 return (
1152 manifests.__getitem__ # pytype: disable=unsupported-operands
1153 )
1152 manifests.__getitem__
1153 ) # pytype: disable=unsupported-operands
1154 1154
1155 1155 def lookupmflinknode(x):
1156 1156 """Callback for looking up the linknode for manifests.
@@ -170,7 +170,12 b' logopts = ['
170 170
171 171 diffopts = [
172 172 (b'a', b'text', None, _(b'treat all files as text')),
173 (b'g', b'git', None, _(b'use git extended diff format (DEFAULT: diff.git)')),
173 (
174 b'g',
175 b'git',
176 None,
177 _(b'use git extended diff format (DEFAULT: diff.git)'),
178 ),
174 179 (b'', b'binary', None, _(b'generate binary diffs in git mode (default)')),
175 180 (b'', b'nodates', None, _(b'omit dates from diff headers')),
176 181 ]
@@ -209,7 +214,9 b' diffopts2 = ('
209 214 b'p',
210 215 b'show-function',
211 216 None,
212 _(b'show which function each change is in (DEFAULT: diff.showfunc)'),
217 _(
218 b'show which function each change is in (DEFAULT: diff.showfunc)'
219 ),
213 220 ),
214 221 (b'', b'reverse', None, _(b'produce a diff that undoes the changes')),
215 222 ]
@@ -6646,7 +6646,12 b' def shelve(ui, repo, *pats, **opts):'
6646 6646 (b'i', b'ignored', None, _(b'show only ignored files')),
6647 6647 (b'n', b'no-status', None, _(b'hide status prefix')),
6648 6648 (b't', b'terse', _NOTTERSE, _(b'show the terse output (EXPERIMENTAL)')),
6649 (b'C', b'copies', None, _(b'show source of copied files (DEFAULT: ui.statuscopies)')),
6649 (
6650 b'C',
6651 b'copies',
6652 None,
6653 _(b'show source of copied files (DEFAULT: ui.statuscopies)'),
6654 ),
6650 6655 (
6651 6656 b'0',
6652 6657 b'print0',
@@ -3429,6 +3429,7 b' def debugsuccessorssets(ui, repo, *revs,'
3429 3429 ui.write(node2str(node))
3430 3430 ui.write(b'\n')
3431 3431
3432
3432 3433 @command(b'debugtagscache', [])
3433 3434 def debugtagscache(ui, repo):
3434 3435 """display the contents of .hg/cache/hgtagsfnodes1"""
@@ -3439,6 +3440,7 b' def debugtagscache(ui, repo):'
3439 3440 tagsnodedisplay = hex(tagsnode) if tagsnode else 'missing/invalid'
3440 3441 ui.write(b'%s %s %s\n' % (r, hex(node), tagsnodedisplay))
3441 3442
3443
3442 3444 @command(
3443 3445 b'debugtemplate',
3444 3446 [
@@ -448,7 +448,7 b' def checkheads(pushop):'
448 448 if branch not in (b'default', None):
449 449 errormsg = _(
450 450 b"push creates new remote head %s on branch '%s'!"
451 ) % (short(dhs[0]), branch)
451 ) % (short(dhs[0]), branch,)
452 452 elif repo[dhs[0]].bookmarks():
453 453 errormsg = _(
454 454 b"push creates new remote head %s "
@@ -624,7 +624,7 b' class cmdalias(object):'
624 624 except error.AmbiguousCommand:
625 625 self.badalias = _(
626 626 b"alias '%s' resolves to ambiguous command '%s'"
627 ) % (self.name, cmd)
627 ) % (self.name, cmd,)
628 628
629 629 def _populatehelp(self, ui, name, cmd, fn, defaulthelp=None):
630 630 # confine strings to be passed to i18n.gettext()
@@ -152,6 +152,7 b' def extshelp(ui):'
152 152 doc = b''.join(rst)
153 153 return doc
154 154
155
155 156 def parsedefaultmarker(text):
156 157 """given a text 'abc (DEFAULT: def.ghi)',
157 158 returns (b'abc', (b'def', b'ghi')). Otherwise return None"""
@@ -159,9 +160,10 b' def parsedefaultmarker(text):'
159 160 marker = b' (DEFAULT: '
160 161 pos = text.find(marker)
161 162 if pos >= 0:
162 item = text[pos + len(marker):-1]
163 item = text[pos + len(marker) : -1]
163 164 return text[:pos], item.split(b'.', 2)
164 165
166
165 167 def optrst(header, options, verbose, ui):
166 168 data = []
167 169 multioccur = False
@@ -734,7 +736,9 b' def help_('
734 736
735 737 if ui.verbose:
736 738 rst.append(
737 optrst(_(b"global options"), commands.globalopts, ui.verbose, ui)
739 optrst(
740 _(b"global options"), commands.globalopts, ui.verbose, ui
741 )
738 742 )
739 743
740 744 if not ui.verbose:
@@ -874,7 +878,9 b' def help_('
874 878 elif ui.verbose:
875 879 rst.append(
876 880 b'\n%s\n'
877 % optrst(_(b"global options"), commands.globalopts, ui.verbose, ui)
881 % optrst(
882 _(b"global options"), commands.globalopts, ui.verbose, ui
883 )
878 884 )
879 885 if name == b'shortlist':
880 886 rst.append(
@@ -324,9 +324,8 b' def checklink(path):'
324 324 open(fullpath, b'w').close()
325 325 except IOError as inst:
326 326 if (
327 inst[0] # pytype: disable=unsupported-operands
328 == errno.EACCES
329 ):
327 inst[0] == errno.EACCES
328 ): # pytype: disable=unsupported-operands
330 329 # If we can't write to cachedir, just pretend
331 330 # that the fs is readonly and by association
332 331 # that the fs won't support symlinks. This
@@ -720,7 +720,9 b' class hgtagsfnodescache(object):'
720 720
721 721 self._dirtyoffset = None
722 722
723 rawlentokeep = min(wantedlen, (rawlen / _fnodesrecsize) * _fnodesrecsize)
723 rawlentokeep = min(
724 wantedlen, (rawlen / _fnodesrecsize) * _fnodesrecsize
725 )
724 726 if rawlen > rawlentokeep:
725 727 # There's no easy way to truncate array instances. This seems
726 728 # slightly less evil than copying a potentially large array slice.
General Comments 0
You need to be logged in to leave comments. Login now