diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-12-02 20:30:09 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-12-02 20:31:15 -0500 |
commit | b75575fd2cf3036d00624abbfc7d94f4f0c4aba8 (patch) | |
tree | fe1b54e2eb2d7fad7502ccc07049efb9bbfc1e26 /coverage/misc.py | |
parent | ae25eefbf48b9e6897af37903ecd697eb19f337f (diff) | |
download | python-coveragepy-git-b75575fd2cf3036d00624abbfc7d94f4f0c4aba8.tar.gz |
Coverage(data_file=None) means no data file at all. #871
Diffstat (limited to 'coverage/misc.py')
-rw-r--r-- | coverage/misc.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/coverage/misc.py b/coverage/misc.py index 2f3bcac6..6f8c368a 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -254,6 +254,20 @@ def _needs_to_implement(that, func_name): ) +class DefaultValue(object): + """A sentinel object to use for unusual default-value needs. + + Construct with a string that will be used as the repr, for display in help + and Sphinx output. + + """ + def __init__(self, display_as): + self.display_as = display_as + + def __repr__(self): + return self.display_as + + def substitute_variables(text, variables): """Substitute ``${VAR}`` variables in `text` with their values. |