diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-07-03 15:43:42 +0100 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2019-07-15 07:40:32 +0000 |
commit | 03ba2cdd54c19d10e80f1174b1e9184c3655a50c (patch) | |
tree | 6cc0f6391a034e6be7da56a57b4db531d9c01102 /src/buildstream | |
parent | ee44d38f8dd56f17b6b0084c574355faa035d695 (diff) | |
download | buildstream-03ba2cdd54c19d10e80f1174b1e9184c3655a50c.tar.gz |
_yaml: Remove 'is_node', which is not used in the codebase anymore
A direct replacement would be isinstance(obj, MappingNode) if someone
really needs it.
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/_yaml.pyx | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/buildstream/_yaml.pyx b/src/buildstream/_yaml.pyx index 1bdc43e6d..176f2be59 100644 --- a/src/buildstream/_yaml.pyx +++ b/src/buildstream/_yaml.pyx @@ -1116,26 +1116,6 @@ cpdef ProvenanceInformation node_get_provenance(Node node, str key=None, list in return ProvenanceInformation(nodeish) -# is_node() -# -# A test method which returns whether or not the passed in value -# is a valid YAML node. It is not valid to call this on a Node -# object which is not a Mapping. -# -# Args: -# maybenode (any): The object to test for nodeness -# -# Returns: -# (bool): Whether or not maybenode was a Node -# -def is_node(maybenode): - # It's a programming error to give this a Node which isn't a mapping - # so assert that. - assert (type(maybenode) not in [ScalarNode, SequenceNode]) - # Now return the type check - return type(maybenode) is MappingNode - - # new_synthetic_file() # # Create a new synthetic mapping node, with an associated file entry |