Patchwork D7265: vfs: add a NotImplementedError implementation of __call__

login
register
mail settings
Submitter phabricator
Date Nov. 6, 2019, 10:57 p.m.
Message ID <differential-rev-PHID-DREV-64g246lr62clazshzwpc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42817/
State Superseded
Headers show

Comments

phabricator - Nov. 6, 2019, 10:57 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This helps pytype considerably on this file.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/vfs.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/vfs.py b/mercurial/vfs.py
--- a/mercurial/vfs.py
+++ b/mercurial/vfs.py
@@ -54,6 +54,9 @@ 
         '''Prevent instantiation; don't call this from subclasses.'''
         raise NotImplementedError('attempted instantiating ' + str(type(self)))
 
+    def __call__(self, path, mode=b'rb', **kwargs):
+        raise NotImplementedError
+
     def _auditpath(self, path, mode):
         raise NotImplementedError