Fix typos
This commit is contained in:
parent
ef744d8609
commit
d856c206fd
4
CHANGES
4
CHANGES
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -61,9 +61,9 @@ 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'}
|
||||
|
||||
|
@ -71,7 +71,7 @@ Example
|
|||
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
|
||||
|
|
|
@ -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)),
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -72,9 +72,9 @@ class Composer(object):
|
|||
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)
|
||||
|
|
|
@ -45,7 +45,7 @@ class Emitter(object):
|
|||
# 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 @@ class Emitter(object):
|
|||
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 @@ class Emitter(object):
|
|||
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 @@ class Emitter(object):
|
|||
|
||||
# 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')
|
||||
|
||||
|
|
|
@ -516,7 +516,7 @@ class Scanner(object):
|
|||
# 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 @@ class Scanner(object):
|
|||
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 @@ class Scanner(object):
|
|||
# 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" ]
|
||||
|
|
|
@ -72,9 +72,9 @@ class Composer:
|
|||
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)
|
||||
|
|
|
@ -41,7 +41,7 @@ class Emitter:
|
|||
# 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 @@ class Emitter:
|
|||
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 @@ class Emitter:
|
|||
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 @@ class Emitter:
|
|||
|
||||
# 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')
|
||||
|
||||
|
|
|
@ -516,7 +516,7 @@ class Scanner:
|
|||
# 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 @@ class Scanner:
|
|||
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 @@ class Scanner:
|
|||
# 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" ]
|
||||
|
|
|
@ -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.
|
||||
|
|
2
setup.py
2
setup.py
|
@ -13,7 +13,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."""
|
||||
AUTHOR = "Kirill Simonov"
|
||||
AUTHOR_EMAIL = 'xi@resolvent.net'
|
||||
LICENSE = "MIT"
|
||||
|
|
Loading…
Reference in New Issue