diff options
| author | pyos <[email protected]> | 2022-02-10 16:47:49 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:49 +0300 |
| commit | ef985e41af0868676d7a2275f1d90261253ddf3b (patch) | |
| tree | 3a6a11d19d8c39c7b90c132bce7e1c3536be37c1 /contrib/python/PyYAML/py2 | |
| parent | 8387f1fb70a4161b7581d3c0da52c4810df655be (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/PyYAML/py2')
| -rw-r--r-- | contrib/python/PyYAML/py2/LICENSE | 2 | ||||
| -rw-r--r-- | contrib/python/PyYAML/py2/yaml/representer.py | 6 | ||||
| -rw-r--r-- | contrib/python/PyYAML/py2/yaml/resolver.py | 8 | ||||
| -rw-r--r-- | contrib/python/PyYAML/py2/yaml/scanner.py | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/contrib/python/PyYAML/py2/LICENSE b/contrib/python/PyYAML/py2/LICENSE index 2f1b8e15e56..3798897eb7c 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 93e09b67b36..8acbdd54c38 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: - return True - if isinstance(data, tuple) and data == (): + if data is None: 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 ba9aeab21d4..0418a08b052 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 587b73d8b47..2fe11ead511 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] |
