Skip to content

Commit d856c20

Browse files
jwilksigmavirus24
authored andcommitted
Fix typos
1 parent ef744d8 commit d856c20

File tree

12 files changed

+31
-31
lines changed

12 files changed

+31
-31
lines changed

CHANGES

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ For a complete Mercurial changelog, see
106106
as lists of pairs instead of dictionaries. No longer check
107107
for duplicate mapping keys as it didn't work correctly anyway.
108108
* Fix invalid output of single-quoted scalars in cases when a single
109-
quote is not escaped when preceeded by whitespaces or line breaks.
109+
quote is not escaped when preceded by whitespaces or line breaks.
110110
* To make porting easier, rewrite Parser not using generators.
111111
* Fix handling of unexpected block mapping values.
112112
* Fix a bug in Representer.represent_object: copy_reg.dispatch_table
@@ -142,6 +142,6 @@ For a complete Mercurial changelog, see
142142
-----------------
143143

144144
* Initial release. The version number reflects the codename
145-
of the project (PyYAML 3000) and differenciates it from
145+
of the project (PyYAML 3000) and differentiates it from
146146
the abandoned PyYaml module.
147147

announcement.msg

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ supports standard YAML tags and provides Python-specific tags that allow
4949
to represent an arbitrary Python object.
5050

5151
PyYAML is applicable for a broad range of tasks from complex
52-
configuration files to object serialization and persistance.
52+
configuration files to object serialization and persistence.
5353

5454

5555
Example
@@ -61,17 +61,17 @@ Example
6161
... name: PyYAML
6262
... description: YAML parser and emitter for Python
6363
... homepage: http://pyyaml.org/wiki/PyYAML
64-
... keywords: [YAML, serialization, configuration, persistance, pickle]
64+
... keywords: [YAML, serialization, configuration, persistence, pickle]
6565
... """)
66-
{'keywords': ['YAML', 'serialization', 'configuration', 'persistance',
66+
{'keywords': ['YAML', 'serialization', 'configuration', 'persistence',
6767
'pickle'], 'homepage': 'http://pyyaml.org/wiki/PyYAML', 'description':
6868
'YAML parser and emitter for Python', 'name': 'PyYAML'}
6969

7070
>>> print yaml.dump(_)
7171
name: PyYAML
7272
homepage: http://pyyaml.org/wiki/PyYAML
7373
description: YAML parser and emitter for Python
74-
keywords: [YAML, serialization, configuration, persistance, pickle]
74+
keywords: [YAML, serialization, configuration, persistence, pickle]
7575

7676

7777
Copyright

examples/pygments-lexer/yaml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class YAMLLexer(ExtendedRegexLexer):
217217
'indentation': [
218218
# trailing whitespaces are ignored
219219
(r'[ ]*$', something(Text.Blank), '#pop:2'),
220-
# whitespaces preceeding block collection indicators
220+
# whitespaces preceding block collection indicators
221221
(r'[ ]+(?=[?:-](?:[ ]|$))', save_indent(Text.Indent)),
222222
# block collection indicators
223223
(r'[?:-](?=[ ]|$)', set_indent(Punctuation.Indicator)),

ext/_yaml.pyx

+4-4
Original file line numberDiff line numberDiff line change
@@ -762,11 +762,11 @@ cdef class CParser:
762762
self.parsed_event.start_mark.column,
763763
None, None)
764764
if PY_MAJOR_VERSION < 3:
765-
raise ComposerError("found duplicate anchor; first occurence",
766-
self.anchors[anchor].start_mark, "second occurence", mark)
765+
raise ComposerError("found duplicate anchor; first occurrence",
766+
self.anchors[anchor].start_mark, "second occurrence", mark)
767767
else:
768-
raise ComposerError(u"found duplicate anchor; first occurence",
769-
self.anchors[anchor].start_mark, u"second occurence", mark)
768+
raise ComposerError(u"found duplicate anchor; first occurrence",
769+
self.anchors[anchor].start_mark, u"second occurrence", mark)
770770
self.descend_resolver(parent, index)
771771
if self.parsed_event.type == YAML_SCALAR_EVENT:
772772
node = self._compose_scalar_node(anchor)

lib/yaml/composer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ def compose_node(self, parent, index):
7272
anchor = event.anchor
7373
if anchor is not None:
7474
if anchor in self.anchors:
75-
raise ComposerError("found duplicate anchor %r; first occurence"
75+
raise ComposerError("found duplicate anchor %r; first occurrence"
7676
% anchor.encode('utf-8'), self.anchors[anchor].start_mark,
77-
"second occurence", event.start_mark)
77+
"second occurrence", event.start_mark)
7878
self.descend_resolver(parent, index)
7979
if self.check_event(ScalarEvent):
8080
node = self.compose_scalar_node(anchor)

lib/yaml/emitter.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, stream, canonical=None, indent=None, width=None,
4545
# The stream should have the methods `write` and possibly `flush`.
4646
self.stream = stream
4747

48-
# Encoding can be overriden by STREAM-START.
48+
# Encoding can be overridden by STREAM-START.
4949
self.encoding = None
5050

5151
# Emitter is a state machine with a stack of states to handle nested
@@ -659,7 +659,7 @@ def analyze_scalar(self, scalar):
659659
flow_indicators = True
660660

661661
# First character or preceded by a whitespace.
662-
preceeded_by_whitespace = True
662+
preceded_by_whitespace = True
663663

664664
# Last character or followed by a whitespace.
665665
followed_by_whitespace = (len(scalar) == 1 or
@@ -696,7 +696,7 @@ def analyze_scalar(self, scalar):
696696
flow_indicators = True
697697
if followed_by_whitespace:
698698
block_indicators = True
699-
if ch == u'#' and preceeded_by_whitespace:
699+
if ch == u'#' and preceded_by_whitespace:
700700
flow_indicators = True
701701
block_indicators = True
702702

@@ -738,7 +738,7 @@ def analyze_scalar(self, scalar):
738738

739739
# Prepare for the next character.
740740
index += 1
741-
preceeded_by_whitespace = (ch in u'\0 \t\r\n\x85\u2028\u2029')
741+
preceded_by_whitespace = (ch in u'\0 \t\r\n\x85\u2028\u2029')
742742
followed_by_whitespace = (index+1 >= len(scalar) or
743743
scalar[index+1] in u'\0 \t\r\n\x85\u2028\u2029')
744744

lib/yaml/scanner.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def fetch_key(self):
516516
# Block context needs additional checks.
517517
if not self.flow_level:
518518

519-
# Are we allowed to start a key (not nessesary a simple)?
519+
# Are we allowed to start a key (not necessary a simple)?
520520
if not self.allow_simple_key:
521521
raise ScannerError(None, None,
522522
"mapping keys are not allowed here",
@@ -564,7 +564,7 @@ def fetch_value(self):
564564
else:
565565

566566
# Block context needs additional checks.
567-
# (Do we really need them? They will be catched by the parser
567+
# (Do we really need them? They will be caught by the parser
568568
# anyway.)
569569
if not self.flow_level:
570570

@@ -902,7 +902,7 @@ def scan_anchor(self, TokenClass):
902902
# The specification does not restrict characters for anchors and
903903
# aliases. This may lead to problems, for instance, the document:
904904
# [ *alias, value ]
905-
# can be interpteted in two ways, as
905+
# can be interpreted in two ways, as
906906
# [ "value" ]
907907
# and
908908
# [ *alias , "value" ]

lib3/yaml/composer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ def compose_node(self, parent, index):
7272
anchor = event.anchor
7373
if anchor is not None:
7474
if anchor in self.anchors:
75-
raise ComposerError("found duplicate anchor %r; first occurence"
75+
raise ComposerError("found duplicate anchor %r; first occurrence"
7676
% anchor, self.anchors[anchor].start_mark,
77-
"second occurence", event.start_mark)
77+
"second occurrence", event.start_mark)
7878
self.descend_resolver(parent, index)
7979
if self.check_event(ScalarEvent):
8080
node = self.compose_scalar_node(anchor)

lib3/yaml/emitter.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __init__(self, stream, canonical=None, indent=None, width=None,
4141
# The stream should have the methods `write` and possibly `flush`.
4242
self.stream = stream
4343

44-
# Encoding can be overriden by STREAM-START.
44+
# Encoding can be overridden by STREAM-START.
4545
self.encoding = None
4646

4747
# Emitter is a state machine with a stack of states to handle nested
@@ -652,7 +652,7 @@ def analyze_scalar(self, scalar):
652652
flow_indicators = True
653653

654654
# First character or preceded by a whitespace.
655-
preceeded_by_whitespace = True
655+
preceded_by_whitespace = True
656656

657657
# Last character or followed by a whitespace.
658658
followed_by_whitespace = (len(scalar) == 1 or
@@ -689,7 +689,7 @@ def analyze_scalar(self, scalar):
689689
flow_indicators = True
690690
if followed_by_whitespace:
691691
block_indicators = True
692-
if ch == '#' and preceeded_by_whitespace:
692+
if ch == '#' and preceded_by_whitespace:
693693
flow_indicators = True
694694
block_indicators = True
695695

@@ -731,7 +731,7 @@ def analyze_scalar(self, scalar):
731731

732732
# Prepare for the next character.
733733
index += 1
734-
preceeded_by_whitespace = (ch in '\0 \t\r\n\x85\u2028\u2029')
734+
preceded_by_whitespace = (ch in '\0 \t\r\n\x85\u2028\u2029')
735735
followed_by_whitespace = (index+1 >= len(scalar) or
736736
scalar[index+1] in '\0 \t\r\n\x85\u2028\u2029')
737737

lib3/yaml/scanner.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def fetch_key(self):
516516
# Block context needs additional checks.
517517
if not self.flow_level:
518518

519-
# Are we allowed to start a key (not nessesary a simple)?
519+
# Are we allowed to start a key (not necessary a simple)?
520520
if not self.allow_simple_key:
521521
raise ScannerError(None, None,
522522
"mapping keys are not allowed here",
@@ -564,7 +564,7 @@ def fetch_value(self):
564564
else:
565565

566566
# Block context needs additional checks.
567-
# (Do we really need them? They will be catched by the parser
567+
# (Do we really need them? They will be caught by the parser
568568
# anyway.)
569569
if not self.flow_level:
570570

@@ -897,7 +897,7 @@ def scan_anchor(self, TokenClass):
897897
# The specification does not restrict characters for anchors and
898898
# aliases. This may lead to problems, for instance, the document:
899899
# [ *alias, value ]
900-
# can be interpteted in two ways, as
900+
# can be interpreted in two ways, as
901901
# [ "value" ]
902902
# and
903903
# [ *alias , "value" ]

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# List of directories to search for 'libyaml.a' (separated by ':').
1010
#library_dirs=/usr/local/lib:../../lib
1111

12-
# An alternative compiler to build the extention.
12+
# An alternative compiler to build the extension.
1313
#compiler=mingw32
1414

1515
# Additional preprocessor definitions might be required.

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
allow to represent an arbitrary Python object.
1414
1515
PyYAML is applicable for a broad range of tasks from complex
16-
configuration files to object serialization and persistance."""
16+
configuration files to object serialization and persistence."""
1717
AUTHOR = "Kirill Simonov"
1818
AUTHOR_EMAIL = '[email protected]'
1919
LICENSE = "MIT"

0 commit comments

Comments
 (0)