Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilk authored and sigmavirus24 committed Aug 8, 2017
1 parent ef744d8 commit d856c20
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ For a complete Mercurial changelog, see
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
Expand Down Expand Up @@ -142,6 +142,6 @@ For a complete Mercurial changelog, see
-----------------

* 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.

8 changes: 4 additions & 4 deletions announcement.msg
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ supports standard YAML tags and provides Python-specific tags that 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.


Example
Expand All @@ -61,17 +61,17 @@ Example
... 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'}

>>> print yaml.dump(_)
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
Expand Down
2 changes: 1 addition & 1 deletion examples/pygments-lexer/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class YAMLLexer(ExtendedRegexLexer):
'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)),
Expand Down
8 changes: 4 additions & 4 deletions ext/_yaml.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -762,11 +762,11 @@ cdef class CParser:
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)
Expand Down
4 changes: 2 additions & 2 deletions lib/yaml/composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def compose_node(self, parent, index):
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)
Expand Down
8 changes: 4 additions & 4 deletions lib/yaml/emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, stream, canonical=None, indent=None, width=None,
# 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
Expand Down Expand Up @@ -659,7 +659,7 @@ def analyze_scalar(self, scalar):
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
Expand Down Expand Up @@ -696,7 +696,7 @@ def analyze_scalar(self, scalar):
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

Expand Down Expand Up @@ -738,7 +738,7 @@ def analyze_scalar(self, scalar):

# 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')

Expand Down
6 changes: 3 additions & 3 deletions lib/yaml/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def fetch_key(self):
# 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",
Expand Down Expand Up @@ -564,7 +564,7 @@ def fetch_value(self):
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:

Expand Down Expand Up @@ -902,7 +902,7 @@ def scan_anchor(self, TokenClass):
# 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" ]
Expand Down
4 changes: 2 additions & 2 deletions lib3/yaml/composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def compose_node(self, parent, index):
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)
Expand Down
8 changes: 4 additions & 4 deletions lib3/yaml/emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, stream, canonical=None, indent=None, width=None,
# 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
Expand Down Expand Up @@ -652,7 +652,7 @@ def analyze_scalar(self, scalar):
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
Expand Down Expand Up @@ -689,7 +689,7 @@ def analyze_scalar(self, scalar):
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

Expand Down Expand Up @@ -731,7 +731,7 @@ def analyze_scalar(self, scalar):

# 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')

Expand Down
6 changes: 3 additions & 3 deletions lib3/yaml/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def fetch_key(self):
# 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",
Expand Down Expand Up @@ -564,7 +564,7 @@ def fetch_value(self):
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:

Expand Down Expand Up @@ -897,7 +897,7 @@ def scan_anchor(self, TokenClass):
# 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" ]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d856c20

Please sign in to comment.