Add type deprecation support.
This commit is contained in:
parent
ea291efbf6
commit
4949af894e
6 changed files with 58 additions and 0 deletions
|
|
@ -133,6 +133,17 @@ class CdistType(object):
|
|||
cannot run in parallel."""
|
||||
return os.path.isfile(os.path.join(self.absolute_path, "nonparallel"))
|
||||
|
||||
@property
|
||||
def deprecated(self):
|
||||
"""Get type deprecation message. If message is None then type
|
||||
is not deprecated."""
|
||||
deprecated_path = os.path.join(self.absolute_path, "deprecated")
|
||||
try:
|
||||
with open(deprecated_path, 'r') as f:
|
||||
return f.read()
|
||||
except FileNotFoundError:
|
||||
return None
|
||||
|
||||
@property
|
||||
def explorers(self):
|
||||
"""Return a list of available explorers"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue