summaryrefslogtreecommitdiff
path: root/src/buildstream/_plugincontext.py
Commit message (Collapse)AuthorAgeFilesLines
* _exceptions.py: Align LoadError() parameter orderingtpollard/loaderrorTom Pollard2019-07-181-3/+3
| | | | | | All of the errors which subclass from BstError have their first positional argument as message, LoadError should follow this ordering for consistency.
* node: Add 'get_str_list' on 'MappingNode'Benjamin Schubert2019-07-171-1/+1
| | | | | | `mapping.get_sequence(...).as_str_list()` is a very common pattern seen both in plugins and the core. Adding a helper to reduce the number of operations will make usage smoother
* _yaml: Introduce 'get_sequence()' and 'sequence_at()'/'mapping_at()'Benjamin Schubert2019-07-151-2/+1
| | | | | | | | | - Adding 'get_sequence' on MappingNode to access sequences in a mapping - Adding 'sequence_at' on SequenceNode to access sequences in a sequence - Adding 'mapping_at' on SequenceNode to access mappings in a sequence Using "*_at" in sequences allows us to quickly understand if we are dealing with a sequence or a mapping.
* _yaml: Add 'as_str()' on ScalarNode and 'get_scalar()' on MappingNodeBenjamin Schubert2019-07-151-5/+5
| | | | | | | | | | - 'get_scalar()' allows retrieving a scalar node from a mapping. - 'as_str()' casts a ScalarNode into a string (thus removing the node information). Both together, those replace 'node_get(mapping, key, type=str)' but also allow retrieving the 'Node' itself, which will allow in the future lazier provenance computation.
* _plugincontext: rm unused self._dependenciesAngelos Evripiotis2019-07-091-3/+3
| | | | Also document the pre-existing format_versions parameter.
* _plugincontext: simplify if statementAngelos Evripiotis2019-07-091-3/+4
| | | | | Add shortened local vars to make this statement easier to read and fit onto one line.
* Move source from 'buildstream' to 'src/buildstream'Chandan Singh2019-05-211-0/+239
This was discussed in #1008. Fixes #1009.