Fix typos
diff --git a/CHANGES b/CHANGES
index 938dc46..500c696 100644
--- a/CHANGES
+++ b/CHANGES
@@ -106,7 +106,7 @@
as lists of pairs instead of dictionaries. No longer check
for duplicate mapping keys as it didn't work correctly anyway.
* Fix invalid output of single-quoted scalars in cases when a single
- quote is not escaped when preceeded by whitespaces or line breaks.
+ quote is not escaped when preceded by whitespaces or line breaks.
* To make porting easier, rewrite Parser not using generators.
* Fix handling of unexpected block mapping values.
* Fix a bug in Representer.represent_object: copy_reg.dispatch_table
@@ -142,6 +142,6 @@
-----------------
* Initial release. The version number reflects the codename
- of the project (PyYAML 3000) and differenciates it from
+ of the project (PyYAML 3000) and differentiates it from
the abandoned PyYaml module.
diff --git a/announcement.msg b/announcement.msg
index c9bfeaa..2b21cf8 100644
--- a/announcement.msg
+++ b/announcement.msg
@@ -49,7 +49,7 @@
to represent an arbitrary Python object.
PyYAML is applicable for a broad range of tasks from complex
-configuration files to object serialization and persistance.
+configuration files to object serialization and persistence.
Example
@@ -61,9 +61,9 @@
... name: PyYAML
... description: YAML parser and emitter for Python
... homepage: http://pyyaml.org/wiki/PyYAML
-... keywords: [YAML, serialization, configuration, persistance, pickle]
+... keywords: [YAML, serialization, configuration, persistence, pickle]
... """)
-{'keywords': ['YAML', 'serialization', 'configuration', 'persistance',
+{'keywords': ['YAML', 'serialization', 'configuration', 'persistence',
'pickle'], 'homepage': 'http://pyyaml.org/wiki/PyYAML', 'description':
'YAML parser and emitter for Python', 'name': 'PyYAML'}
@@ -71,7 +71,7 @@
name: PyYAML
homepage: http://pyyaml.org/wiki/PyYAML
description: YAML parser and emitter for Python
-keywords: [YAML, serialization, configuration, persistance, pickle]
+keywords: [YAML, serialization, configuration, persistence, pickle]
Copyright
diff --git a/examples/pygments-lexer/yaml.py b/examples/pygments-lexer/yaml.py
index 1ce9dac..1a1bbde 100644
--- a/examples/pygments-lexer/yaml.py
+++ b/examples/pygments-lexer/yaml.py
@@ -217,7 +217,7 @@
'indentation': [
# trailing whitespaces are ignored
(r'[ ]*$', something(Text.Blank), '#pop:2'),
- # whitespaces preceeding block collection indicators
+ # whitespaces preceding block collection indicators
(r'[ ]+(?=[?:-](?:[ ]|$))', save_indent(Text.Indent)),
# block collection indicators
(r'[?:-](?=[ ]|$)', set_indent(Punctuation.Indicator)),
diff --git a/ext/_yaml.pyx b/ext/_yaml.pyx
index 83eca65..b2f409c 100644
--- a/ext/_yaml.pyx
+++ b/ext/_yaml.pyx
@@ -762,11 +762,11 @@
self.parsed_event.start_mark.column,
None, None)
if PY_MAJOR_VERSION < 3:
- raise ComposerError("found duplicate anchor; first occurence",
- self.anchors[anchor].start_mark, "second occurence", mark)
+ raise ComposerError("found duplicate anchor; first occurrence",
+ self.anchors[anchor].start_mark, "second occurrence", mark)
else:
- raise ComposerError(u"found duplicate anchor; first occurence",
- self.anchors[anchor].start_mark, u"second occurence", mark)
+ raise ComposerError(u"found duplicate anchor; first occurrence",
+ self.anchors[anchor].start_mark, u"second occurrence", mark)
self.descend_resolver(parent, index)
if self.parsed_event.type == YAML_SCALAR_EVENT:
node = self._compose_scalar_node(anchor)
diff --git a/lib/yaml/composer.py b/lib/yaml/composer.py
index 06e5ac7..df85ef6 100644
--- a/lib/yaml/composer.py
+++ b/lib/yaml/composer.py
@@ -72,9 +72,9 @@
anchor = event.anchor
if anchor is not None:
if anchor in self.anchors:
- raise ComposerError("found duplicate anchor %r; first occurence"
+ raise ComposerError("found duplicate anchor %r; first occurrence"
% anchor.encode('utf-8'), self.anchors[anchor].start_mark,
- "second occurence", event.start_mark)
+ "second occurrence", event.start_mark)
self.descend_resolver(parent, index)
if self.check_event(ScalarEvent):
node = self.compose_scalar_node(anchor)
diff --git a/lib/yaml/emitter.py b/lib/yaml/emitter.py
index 5fb4179..9561a82 100644
--- a/lib/yaml/emitter.py
+++ b/lib/yaml/emitter.py
@@ -45,7 +45,7 @@
# The stream should have the methods `write` and possibly `flush`.
self.stream = stream
- # Encoding can be overriden by STREAM-START.
+ # Encoding can be overridden by STREAM-START.
self.encoding = None
# Emitter is a state machine with a stack of states to handle nested
@@ -659,7 +659,7 @@
flow_indicators = True
# First character or preceded by a whitespace.
- preceeded_by_whitespace = True
+ preceded_by_whitespace = True
# Last character or followed by a whitespace.
followed_by_whitespace = (len(scalar) == 1 or
@@ -696,7 +696,7 @@
flow_indicators = True
if followed_by_whitespace:
block_indicators = True
- if ch == u'#' and preceeded_by_whitespace:
+ if ch == u'#' and preceded_by_whitespace:
flow_indicators = True
block_indicators = True
@@ -738,7 +738,7 @@
# Prepare for the next character.
index += 1
- preceeded_by_whitespace = (ch in u'\0 \t\r\n\x85\u2028\u2029')
+ preceded_by_whitespace = (ch in u'\0 \t\r\n\x85\u2028\u2029')
followed_by_whitespace = (index+1 >= len(scalar) or
scalar[index+1] in u'\0 \t\r\n\x85\u2028\u2029')
diff --git a/lib/yaml/scanner.py b/lib/yaml/scanner.py
index 73a3177..f86cb80 100644
--- a/lib/yaml/scanner.py
+++ b/lib/yaml/scanner.py
@@ -516,7 +516,7 @@
# Block context needs additional checks.
if not self.flow_level:
- # Are we allowed to start a key (not nessesary a simple)?
+ # Are we allowed to start a key (not necessary a simple)?
if not self.allow_simple_key:
raise ScannerError(None, None,
"mapping keys are not allowed here",
@@ -564,7 +564,7 @@
else:
# Block context needs additional checks.
- # (Do we really need them? They will be catched by the parser
+ # (Do we really need them? They will be caught by the parser
# anyway.)
if not self.flow_level:
@@ -902,7 +902,7 @@
# The specification does not restrict characters for anchors and
# aliases. This may lead to problems, for instance, the document:
# [ *alias, value ]
- # can be interpteted in two ways, as
+ # can be interpreted in two ways, as
# [ "value" ]
# and
# [ *alias , "value" ]
diff --git a/lib3/yaml/composer.py b/lib3/yaml/composer.py
index d5c6a7a..6d15cb4 100644
--- a/lib3/yaml/composer.py
+++ b/lib3/yaml/composer.py
@@ -72,9 +72,9 @@
anchor = event.anchor
if anchor is not None:
if anchor in self.anchors:
- raise ComposerError("found duplicate anchor %r; first occurence"
+ raise ComposerError("found duplicate anchor %r; first occurrence"
% anchor, self.anchors[anchor].start_mark,
- "second occurence", event.start_mark)
+ "second occurrence", event.start_mark)
self.descend_resolver(parent, index)
if self.check_event(ScalarEvent):
node = self.compose_scalar_node(anchor)
diff --git a/lib3/yaml/emitter.py b/lib3/yaml/emitter.py
index 3479883..5704bc8 100644
--- a/lib3/yaml/emitter.py
+++ b/lib3/yaml/emitter.py
@@ -41,7 +41,7 @@
# The stream should have the methods `write` and possibly `flush`.
self.stream = stream
- # Encoding can be overriden by STREAM-START.
+ # Encoding can be overridden by STREAM-START.
self.encoding = None
# Emitter is a state machine with a stack of states to handle nested
@@ -652,7 +652,7 @@
flow_indicators = True
# First character or preceded by a whitespace.
- preceeded_by_whitespace = True
+ preceded_by_whitespace = True
# Last character or followed by a whitespace.
followed_by_whitespace = (len(scalar) == 1 or
@@ -689,7 +689,7 @@
flow_indicators = True
if followed_by_whitespace:
block_indicators = True
- if ch == '#' and preceeded_by_whitespace:
+ if ch == '#' and preceded_by_whitespace:
flow_indicators = True
block_indicators = True
@@ -731,7 +731,7 @@
# Prepare for the next character.
index += 1
- preceeded_by_whitespace = (ch in '\0 \t\r\n\x85\u2028\u2029')
+ preceded_by_whitespace = (ch in '\0 \t\r\n\x85\u2028\u2029')
followed_by_whitespace = (index+1 >= len(scalar) or
scalar[index+1] in '\0 \t\r\n\x85\u2028\u2029')
diff --git a/lib3/yaml/scanner.py b/lib3/yaml/scanner.py
index 172c788..3b49407 100644
--- a/lib3/yaml/scanner.py
+++ b/lib3/yaml/scanner.py
@@ -516,7 +516,7 @@
# Block context needs additional checks.
if not self.flow_level:
- # Are we allowed to start a key (not nessesary a simple)?
+ # Are we allowed to start a key (not necessary a simple)?
if not self.allow_simple_key:
raise ScannerError(None, None,
"mapping keys are not allowed here",
@@ -564,7 +564,7 @@
else:
# Block context needs additional checks.
- # (Do we really need them? They will be catched by the parser
+ # (Do we really need them? They will be caught by the parser
# anyway.)
if not self.flow_level:
@@ -897,7 +897,7 @@
# The specification does not restrict characters for anchors and
# aliases. This may lead to problems, for instance, the document:
# [ *alias, value ]
- # can be interpteted in two ways, as
+ # can be interpreted in two ways, as
# [ "value" ]
# and
# [ *alias , "value" ]
diff --git a/setup.cfg b/setup.cfg
index d0239e4..067c6bc 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -9,7 +9,7 @@
# List of directories to search for 'libyaml.a' (separated by ':').
#library_dirs=/usr/local/lib:../../lib
-# An alternative compiler to build the extention.
+# An alternative compiler to build the extension.
#compiler=mingw32
# Additional preprocessor definitions might be required.
diff --git a/setup.py b/setup.py
index 2570870..9892ab5 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@
allow to represent an arbitrary Python object.
PyYAML is applicable for a broad range of tasks from complex
-configuration files to object serialization and persistance."""
+configuration files to object serialization and persistence."""
AUTHOR = "Kirill Simonov"
AUTHOR_EMAIL = 'xi@resolvent.net'
LICENSE = "MIT"