Mercurial > public > mercurial-scm > hg
comparison mercurial/vfs.py @ 43467:b16912f8c07c
vfs: add a NotImplementedError implementation of __call__
This helps pytype considerably on this file.
Differential Revision: https://phab.mercurial-scm.org/D7265
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 06 Nov 2019 15:11:30 -0500 |
parents | 2dcd4e773193 |
children | 8b0fa4de0064 |
comparison
equal
deleted
inserted
replaced
43466:2dcd4e773193 | 43467:b16912f8c07c |
---|---|
51 """Abstract base class; cannot be instantiated""" | 51 """Abstract base class; cannot be instantiated""" |
52 | 52 |
53 def __init__(self, *args, **kwargs): | 53 def __init__(self, *args, **kwargs): |
54 '''Prevent instantiation; don't call this from subclasses.''' | 54 '''Prevent instantiation; don't call this from subclasses.''' |
55 raise NotImplementedError('attempted instantiating ' + str(type(self))) | 55 raise NotImplementedError('attempted instantiating ' + str(type(self))) |
56 | |
57 def __call__(self, path, mode=b'rb', **kwargs): | |
58 raise NotImplementedError | |
56 | 59 |
57 def _auditpath(self, path, mode): | 60 def _auditpath(self, path, mode): |
58 raise NotImplementedError | 61 raise NotImplementedError |
59 | 62 |
60 def tryread(self, path): | 63 def tryread(self, path): |