Switch TempDirectory.path to property

This commit is contained in:
Chris Hunt 2019-09-23 18:41:31 -04:00
parent ebd286ebec
commit 97ec73881e
1 changed files with 6 additions and 1 deletions

View File

@ -53,10 +53,15 @@ class TempDirectory(object):
if path is None:
path = self._create(kind)
self.path = path
self._path = path
self.delete = delete
self.kind = kind
@property
def path(self):
# type: () -> str
return self._path
def __repr__(self):
return "<{} {!r}>".format(self.__class__.__name__, self.path)