summaryrefslogtreecommitdiff
path: root/coverage/misc.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/misc.py')
-rw-r--r--coverage/misc.py14
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.