summaryrefslogtreecommitdiff
path: root/nodes.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-07-12 12:13:34 +0200
committerAnthon van der Neut <anthon@mnt.org>2017-07-12 12:13:34 +0200
commit2ea4de43fe2e0160e27b605f2c65f33c5a2083d7 (patch)
treeddd268394e9fa05011585fd326cb4f635f0510a1 /nodes.py
parentae5b5638efc9f20c027aac28f52dbfe0fc955998 (diff)
downloadruamel.yaml-2ea4de43fe2e0160e27b605f2c65f33c5a2083d7.tar.gz
update to flake8==3.3.0 with --ignore F405
Diffstat (limited to 'nodes.py')
-rw-r--r--nodes.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/nodes.py b/nodes.py
index 8babbd7..781df94 100644
--- a/nodes.py
+++ b/nodes.py
@@ -2,6 +2,8 @@
from __future__ import print_function
+from .compat import string_types
+
if False: # MYPY
from typing import Dict, Any, Text # NOQA
@@ -39,7 +41,7 @@ class Node(object):
def dump(self, indent=0):
# type: (int) -> None
- if isinstance(self.value, basestring):
+ if isinstance(self.value, string_types):
print('{}{}(tag={!r}, value={!r})'.format(
' ' * indent, self.__class__.__name__, self.tag, self.value))
if self.comment:
@@ -54,9 +56,9 @@ class Node(object):
for v in self.value:
if isinstance(v, tuple):
for v1 in v:
- v1.dump(indent+1)
+ v1.dump(indent + 1)
elif isinstance(v, Node):
- v.dump(indent+1)
+ v.dump(indent + 1)
else:
print('Node value type?', type(v))