soleil.loader.pre_processor#
Classes
|
Injects the _target keyword argument to load() calls and converts all assignments to |
|
Docstrings are only supported for classes and functions in python. |
|
Keeps track of all imported names |
|
Checks that a promoted name is promoted at the module level and registers the name. |
|
Applies some processing when a class has known decorators |
|
Applies some processing when an assignment has annotations. |
|
|
|
|
|
|
|
Keeps track of the latest qualified name |
- class soleil.loader.pre_processor.RaisesError(path, *args, **kwargs)#
Bases:
NodeVisitor
- class soleil.loader.pre_processor.GetImportedNames(*args, **kwargs)#
Bases:
RaisesError,NodeVisitorKeeps track of all imported names
- class soleil.loader.pre_processor.TrackQualName(*args, **kwargs)#
Bases:
RaisesError,NodeVisitorKeeps track of the latest qualified name
- class soleil.loader.pre_processor.ProcessClassDecorators(*args, **kwargs)#
Bases:
TrackQualName,ABCApplies some processing when a class has known decorators
- class soleil.loader.pre_processor.ProcessModifiers(*args, **kwargs)#
Bases:
TrackQualName,ABCApplies some processing when an assignment has annotations.
- class soleil.loader.pre_processor.GetPromotedName(*args, **kwargs)#
Bases:
ProcessClassDecorators,ProcessModifiersChecks that a promoted name is promoted at the module level and registers the name.
Keeps a dicitionary of (unpromoted) qualified names and modifiers (as strings).
- property promoted_name#
The name of the promoted member
- class soleil.loader.pre_processor.ExtractDocStrings(*args, **kwargs)#
Bases:
TrackQualNameDocstrings are only supported for classes and functions in python. This extractor adds support for sphinx-like global/class variable documentation
- class soleil.loader.pre_processor.ProtectKeywords(path, *args, **kwargs)#
Bases:
RaisesError,NodeVisitor
- class soleil.loader.pre_processor.AddTargetToLoads(path, *args, **kwargs)#
Bases:
RaisesError,NodeTransformerInjects the _target keyword argument to load() calls and converts all assignments to
_soleil_overridecalls.
- class soleil.loader.pre_processor.SoleilPreProcessor(*args, **kwargs)#
Bases:
ProtectKeywords,GetPromotedName,GetImportedNames,AddTargetToLoads,NodeTransformer- visit(tree: Module)#
Visit a node.