Page MenuHomePhabricator

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

Authored by durin42 on Thu, Jun 20, 2:36 PM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durin42 created this revision.Thu, Jun 20, 2:36 PM
durin42 updated this revision to Diff 15797.Mon, Jul 8, 1:15 PM
durin42 updated this revision to Diff 15798.Mon, Jul 8, 1:27 PM
pulkit accepted this revision.Mon, Jul 8, 5:10 PM
This revision is now accepted and ready to land.Mon, Jul 8, 5:10 PM
This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.Tue, Jul 9, 8:10 PM

@@ -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.