help in variable or family now
This commit is contained in:
@ -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:
|
||||
|
@ -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*)*)>
|
||||
|
Reference in New Issue
Block a user