From b75575fd2cf3036d00624abbfc7d94f4f0c4aba8 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 2 Dec 2019 20:30:09 -0500 Subject: Coverage(data_file=None) means no data file at all. #871 --- coverage/misc.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'coverage/misc.py') 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. -- cgit v1.2.1