Mercurial > public > mercurial-scm > hg
comparison mercurial/vfs.py @ 48946:642e31cb55f0
py3: use class X: instead of class X(object):
The inheritance from object is implied in Python 3. So this should
be equivalent.
This change was generated via an automated search and replace. So there
may have been some accidental changes.
Differential Revision: https://phab.mercurial-scm.org/D12352
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Feb 2022 13:08:28 -0700 |
parents | 6000f5b25c9b |
children | 2e726c934fcd |
comparison
equal
deleted
inserted
replaced
48945:55d132525155 | 48946:642e31cb55f0 |
---|---|
44 # advance mtime (see issue5418) | 44 # advance mtime (see issue5418) |
45 util.rename(util.mktempcopy(path), path) | 45 util.rename(util.mktempcopy(path), path) |
46 checkandavoid() | 46 checkandavoid() |
47 | 47 |
48 | 48 |
49 class abstractvfs(object): | 49 class abstractvfs: |
50 """Abstract base class; cannot be instantiated""" | 50 """Abstract base class; cannot be instantiated""" |
51 | 51 |
52 # default directory separator for vfs | 52 # default directory separator for vfs |
53 # | 53 # |
54 # Other vfs code always use `/` and this works fine because python file API | 54 # Other vfs code always use `/` and this works fine because python file API |
604 | 604 |
605 def join(self, path, *insidef): | 605 def join(self, path, *insidef): |
606 return self.vfs.join(path, *insidef) | 606 return self.vfs.join(path, *insidef) |
607 | 607 |
608 | 608 |
609 class closewrapbase(object): | 609 class closewrapbase: |
610 """Base class of wrapper, which hooks closing | 610 """Base class of wrapper, which hooks closing |
611 | 611 |
612 Do not instantiate outside of the vfs layer. | 612 Do not instantiate outside of the vfs layer. |
613 """ | 613 """ |
614 | 614 |
650 | 650 |
651 def close(self): | 651 def close(self): |
652 self._closer.close(self._origfh) | 652 self._closer.close(self._origfh) |
653 | 653 |
654 | 654 |
655 class backgroundfilecloser(object): | 655 class backgroundfilecloser: |
656 """Coordinates background closing of file handles on multiple threads.""" | 656 """Coordinates background closing of file handles on multiple threads.""" |
657 | 657 |
658 def __init__(self, ui, expectedcount=-1): | 658 def __init__(self, ui, expectedcount=-1): |
659 self._running = False | 659 self._running = False |
660 self._entered = False | 660 self._entered = False |