diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-07-03 15:43:42 +0100 |
---|---|---|
committer | Benjamin Schubert <contact@benschubert.me> | 2019-07-03 16:57:34 +0000 |
commit | 492996b6461f39068e52504c4b65bf39edfbc44c (patch) | |
tree | fe12ad33c8ecdc851dab973eb34c941da8342027 | |
parent | b4b0f79f6e09a89f1eee785702f47e5975e41bf7 (diff) | |
download | buildstream-bschubert/node-no-isnode.tar.gz |
_yaml: Remove 'is_node', which is not used in the codebase anymorebschubert/node-no-isnode
A direct replacement would be isinstance(obj, MappingNode) if someone
really needs it.
-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 6420474eb..3dbf7bfea 100644 --- a/src/buildstream/_yaml.pyx +++ b/src/buildstream/_yaml.pyx @@ -1137,26 +1137,6 @@ def node_extend_list(Node node, str key, Py_ssize_t length, object default): the_list.append(_create_node(value, file_index, line_num, next_synthetic_counter())) -# 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 |