help in variable or family now

This commit is contained in:
2020-12-23 13:29:51 +01:00
parent 08ed28fc95
commit 6c6746c58f
171 changed files with 23 additions and 1335 deletions

View File

@ -473,7 +473,6 @@ class VariableAnnotator:
):
self.objectspace = objectspace
self.convert_variable()
self.convert_helps()
self.convert_auto_freeze()
self.convert_separators()
@ -567,20 +566,6 @@ class VariableAnnotator:
)
_valid_type(variable)
def convert_helps(self):
if not hasattr(self.objectspace.space, 'help'):
return
helps = self.objectspace.space.help
if hasattr(helps, 'variable'):
for hlp in helps.variable.values():
variable = self.objectspace.paths.get_variable_obj(hlp.name)
variable.help = hlp.text
if hasattr(helps, 'family'):
for hlp in helps.family.values():
variable = self.objectspace.paths.get_family_obj(hlp.name)
variable.help = hlp.text
del self.objectspace.space.help
def convert_auto_freeze(self): # pylint: disable=C0111
def _convert_auto_freeze(variable, namespace):
if variable.auto_freeze:

View File

@ -80,17 +80,19 @@
<!ATTLIST override templating (True|False) "True">
<!ELEMENT variables (family*, separators*)>
<!ELEMENT family (#PCDATA | variable)*>
<!ELEMENT family (variable*)>
<!ATTLIST family name CDATA #REQUIRED>
<!ATTLIST family description CDATA #IMPLIED>
<!ATTLIST family help CDATA #IMPLIED>
<!ATTLIST family mode (basic|normal|expert) "basic">
<!ATTLIST family hidden (True|False) "False">
<!ATTLIST family dynamic CDATA #IMPLIED>
<!ELEMENT variable (#PCDATA | value)*>
<!ELEMENT variable (value*)>
<!ATTLIST variable name CDATA #REQUIRED>
<!ATTLIST variable type CDATA #IMPLIED>
<!ATTLIST variable description CDATA #IMPLIED>
<!ATTLIST variable help CDATA #IMPLIED>
<!ATTLIST variable hidden (True|False) "False">
<!ATTLIST variable disabled (True|False) "False">
<!ATTLIST variable multi (True|False) "False">
@ -145,5 +147,3 @@
<!ATTLIST target optional (True|False) "False">
<!ELEMENT follower (#PCDATA)>
<!ELEMENT help ((variable* | family*)*)>