Skip to content
Snippets Groups Projects
Commit b65010d5 authored by Dan Nixon's avatar Dan Nixon
Browse files

Use italics for optionality in Default column

Refs #11178
parent 8a297a16
No related branches found
No related tags found
No related merge requests found
...@@ -141,7 +141,7 @@ class PropertiesDirective(AlgorithmBaseDirective): ...@@ -141,7 +141,7 @@ class PropertiesDirective(AlgorithmBaseDirective):
elif (prop.isValid == ""): elif (prop.isValid == ""):
default_prop = self._create_property_default_string(prop) default_prop = self._create_property_default_string(prop)
else: else:
default_prop = "Mandatory" default_prop = "*Mandatory*"
return default_prop return default_prop
def _create_property_default_string(self, prop): def _create_property_default_string(self, prop):
...@@ -162,14 +162,14 @@ class PropertiesDirective(AlgorithmBaseDirective): ...@@ -162,14 +162,14 @@ class PropertiesDirective(AlgorithmBaseDirective):
try: try:
val = int(default) val = int(default)
if (val >= 2147483647): if (val >= 2147483647):
defaultstr = "Optional" defaultstr = "*Optional*"
else: else:
defaultstr = str(val) defaultstr = str(val)
except: except:
try: try:
val = float(default) val = float(default)
if (val >= 1e+307): if (val >= 1e+307):
defaultstr = "Optional" defaultstr = "*Optional*"
else: else:
defaultstr = str(val) defaultstr = str(val)
except: except:
...@@ -190,7 +190,7 @@ class PropertiesDirective(AlgorithmBaseDirective): ...@@ -190,7 +190,7 @@ class PropertiesDirective(AlgorithmBaseDirective):
if (defaultstr == "8.9884656743115785e+307") or \ if (defaultstr == "8.9884656743115785e+307") or \
(defaultstr == "1.7976931348623157e+308") or \ (defaultstr == "1.7976931348623157e+308") or \
(defaultstr == "2147483647"): (defaultstr == "2147483647"):
defaultstr = "Optional" defaultstr = "*Optional*"
if str(prop.type) == "boolean": if str(prop.type) == "boolean":
if defaultstr == "1": if defaultstr == "1":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment