Detected with pytype.
Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG2dcd4e773193: vfs: fix erroneous bytes constants
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
| indygreg |
| hg-reviewers |
Detected with pytype.
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/vfs.py (6 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| c509578d4641 | 88ee204acada | Augie Fackler | Nov 6 2019, 3:19 PM |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 |
| checkandavoid() | checkandavoid() | ||||
| class abstractvfs(object): | class abstractvfs(object): | ||||
| """Abstract base class; cannot be instantiated""" | """Abstract base class; cannot be instantiated""" | ||||
| def __init__(self, *args, **kwargs): | def __init__(self, *args, **kwargs): | ||||
| '''Prevent instantiation; don't call this from subclasses.''' | '''Prevent instantiation; don't call this from subclasses.''' | ||||
| raise NotImplementedError(b'attempted instantiating ' + str(type(self))) | raise NotImplementedError('attempted instantiating ' + str(type(self))) | ||||
| def _auditpath(self, path, mode): | def _auditpath(self, path, mode): | ||||
| raise NotImplementedError | raise NotImplementedError | ||||
| def tryread(self, path): | def tryread(self, path): | ||||
| '''gracefully return an empty string for missing files''' | '''gracefully return an empty string for missing files''' | ||||
| try: | try: | ||||
| return self.read(path) | return self.read(path) | ||||
| def __delattr__(self, attr): | def __delattr__(self, attr): | ||||
| return delattr(self._origfh, attr) | return delattr(self._origfh, attr) | ||||
| def __enter__(self): | def __enter__(self): | ||||
| self._origfh.__enter__() | self._origfh.__enter__() | ||||
| return self | return self | ||||
| def __exit__(self, exc_type, exc_value, exc_tb): | def __exit__(self, exc_type, exc_value, exc_tb): | ||||
| raise NotImplementedError(b'attempted instantiating ' + str(type(self))) | raise NotImplementedError('attempted instantiating ' + str(type(self))) | ||||
| def close(self): | def close(self): | ||||
| raise NotImplementedError(b'attempted instantiating ' + str(type(self))) | raise NotImplementedError('attempted instantiating ' + str(type(self))) | ||||
| class delayclosedfile(closewrapbase): | class delayclosedfile(closewrapbase): | ||||
| """Proxy for a file object whose close is delayed. | """Proxy for a file object whose close is delayed. | ||||
| Do not instantiate outside of the vfs layer. | Do not instantiate outside of the vfs layer. | ||||
| """ | """ | ||||