summaryrefslogtreecommitdiffstats
path: root/contrib/python/PyYAML/py2
diff options
context:
space:
mode:
authorpyos <[email protected]>2022-02-10 16:47:49 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:49 +0300
commitb031b9d140bcd39f4ef2764e24d37bee317aaf23 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /contrib/python/PyYAML/py2
parentef985e41af0868676d7a2275f1d90261253ddf3b (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/PyYAML/py2')
-rw-r--r--contrib/python/PyYAML/py2/LICENSE2
-rw-r--r--contrib/python/PyYAML/py2/yaml/representer.py6
-rw-r--r--contrib/python/PyYAML/py2/yaml/resolver.py8
-rw-r--r--contrib/python/PyYAML/py2/yaml/scanner.py4
4 files changed, 10 insertions, 10 deletions
diff --git a/contrib/python/PyYAML/py2/LICENSE b/contrib/python/PyYAML/py2/LICENSE
index 3798897eb7c..2f1b8e15e56 100644
--- a/contrib/python/PyYAML/py2/LICENSE
+++ b/contrib/python/PyYAML/py2/LICENSE
@@ -1,5 +1,5 @@
Copyright (c) 2017-2021 Ingy döt Net
-Copyright (c) 2006-2016 Kirill Simonov
+Copyright (c) 2006-2016 Kirill Simonov
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/contrib/python/PyYAML/py2/yaml/representer.py b/contrib/python/PyYAML/py2/yaml/representer.py
index 8acbdd54c38..93e09b67b36 100644
--- a/contrib/python/PyYAML/py2/yaml/representer.py
+++ b/contrib/python/PyYAML/py2/yaml/representer.py
@@ -142,10 +142,10 @@ class BaseRepresenter(object):
class SafeRepresenter(BaseRepresenter):
def ignore_aliases(self, data):
- if data is None:
+ if data is None:
+ return True
+ if isinstance(data, tuple) and data == ():
return True
- if isinstance(data, tuple) and data == ():
- return True
if isinstance(data, (str, unicode, bool, int, float)):
return True
diff --git a/contrib/python/PyYAML/py2/yaml/resolver.py b/contrib/python/PyYAML/py2/yaml/resolver.py
index 0418a08b052..ba9aeab21d4 100644
--- a/contrib/python/PyYAML/py2/yaml/resolver.py
+++ b/contrib/python/PyYAML/py2/yaml/resolver.py
@@ -24,10 +24,10 @@ class BaseResolver(object):
def add_implicit_resolver(cls, tag, regexp, first):
if not 'yaml_implicit_resolvers' in cls.__dict__:
- implicit_resolvers = {}
- for key in cls.yaml_implicit_resolvers:
- implicit_resolvers[key] = cls.yaml_implicit_resolvers[key][:]
- cls.yaml_implicit_resolvers = implicit_resolvers
+ implicit_resolvers = {}
+ for key in cls.yaml_implicit_resolvers:
+ implicit_resolvers[key] = cls.yaml_implicit_resolvers[key][:]
+ cls.yaml_implicit_resolvers = implicit_resolvers
if first is None:
first = [None]
for ch in first:
diff --git a/contrib/python/PyYAML/py2/yaml/scanner.py b/contrib/python/PyYAML/py2/yaml/scanner.py
index 2fe11ead511..587b73d8b47 100644
--- a/contrib/python/PyYAML/py2/yaml/scanner.py
+++ b/contrib/python/PyYAML/py2/yaml/scanner.py
@@ -291,7 +291,7 @@ class Scanner(object):
or self.index-key.index > 1024:
if key.required:
raise ScannerError("while scanning a simple key", key.mark,
- "could not find expected ':'", self.get_mark())
+ "could not find expected ':'", self.get_mark())
del self.possible_simple_keys[level]
def save_possible_simple_key(self):
@@ -318,7 +318,7 @@ class Scanner(object):
if key.required:
raise ScannerError("while scanning a simple key", key.mark,
- "could not find expected ':'", self.get_mark())
+ "could not find expected ':'", self.get_mark())
del self.possible_simple_keys[self.flow_level]