D6556: cleanup: use named constants for second arg to .seek()

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Tue Jul 9 20:10:45 EDT 2019


yuja added a comment.


  > @@ -16,6 +16,7 @@
  >  import collections
  >  import contextlib
  >  import errno
  > +import io
  >  import os
  >  import struct
  >  import zlib
  > @@ -2306,7 +2307,7 @@
  >
  >   try:
  >       with self._datafp() as f:
  >
  > - f.seek(0, 2)
  >
  > +                f.seek(0, io.SEEK_END)
  
  Nit: can be `os.SEEK_END` since we don't use the (new) io module on Python 2.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6556/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6556

To: durin42, indygreg, #hg-reviewers, pulkit
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list