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

This is an archive of the discontinued Mercurial Phabricator instance.

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

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

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durin42 created this revision.Jun 20 2019, 2:36 PM
durin42 updated this revision to Diff 15797.Jul 8 2019, 1:15 PM
durin42 updated this revision to Diff 15798.Jul 8 2019, 1:27 PM
pulkit accepted this revision.Jul 8 2019, 5:10 PM
This revision is now accepted and ready to land.Jul 8 2019, 5:10 PM
This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.Jul 9 2019, 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.