summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-07-03 15:43:42 +0100
committerBenjamin Schubert <ben.c.schubert@gmail.com>2019-07-09 16:55:55 +0100
commit2139089b237491b09557bbd0b6c8c59b8688756c (patch)
tree515cd3a06fc5f450ccc503c0b3183092e25c6e4b
parentda877226411d7316010e9d12e000a30c1a58b050 (diff)
downloadbuildstream-2139089b237491b09557bbd0b6c8c59b8688756c.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.
-rw-r--r--src/buildstream/_yaml.pyx20
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