Extract information about a source module from
its parse tree.
Methods
|
|
__init__
_extractConfigurationValues
_extractImportedModules
getClassInfo
getClassNames
getCommentKey
getImportData
getReferenceTargetName
|
|
__init__
|
__init__ (
self,
parent,
tree,
name="<string>",
fileName=None,
commentInfo={},
defaultConfigValues={},
)
Initialize the info extractor.
Parameters:
- tree
- parse tree from which to extract information
- name
- name of the module
- fileName
- name of the file containing the module
- commentInfo
- comments extracted from the file
|
|
_extractConfigurationValues
|
_extractConfigurationValues ( self, matchConfigValue=re.compile( '^#\s*HappyDoc:(.+)$', re.IGNORECASE ).match )
Look into the module source file and extract HappyDoc configuration values.
Variables can be embedded in the first comment block of the module.
|
|
_extractImportedModules
|
_extractImportedModules ( self, tree )
Returns modules imported by code in tree.
Scan the parse tree for import statements
and return the names of all modules imported.
|
|
getClassInfo
|
getClassInfo ( self, name )
Return a ClassInfo object for the class by name.
|
|
getClassNames
|
getClassNames ( self )
Return the names of classes defined within the module.
|
|
getCommentKey
|
getCommentKey ( self )
|
|
getImportData
|
getImportData ( self )
Returns a list of which symbols are imported.
|
|
getReferenceTargetName
|
getReferenceTargetName ( self )
Return the name to use as a target for a reference such as a hyperlink.
|