Skip to content

Commit de11e43

Browse files
dthkaoperlpunk
authored andcommitted
fix typos and stylistic nit
1 parent a7a9787 commit de11e43

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lib/yaml/constructor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def find_python_module(self, name, mark, unsafe=False):
497497
except ImportError, exc:
498498
raise ConstructorError("while constructing a Python module", mark,
499499
"cannot find module %r (%s)" % (name.encode('utf-8'), exc), mark)
500-
if not name in sys.modules:
500+
if name not in sys.modules:
501501
raise ConstructorError("while constructing a Python module", mark,
502502
"module %r is not imported" % name.encode('utf-8'), mark)
503503
return sys.modules[name]
@@ -517,7 +517,7 @@ def find_python_name(self, name, mark, unsafe=False):
517517
except ImportError, exc:
518518
raise ConstructorError("while constructing a Python object", mark,
519519
"cannot find module %r (%s)" % (module_name.encode('utf-8'), exc), mark)
520-
if not module_name in sys.modules:
520+
if module_name not in sys.modules:
521521
raise ConstructorError("while constructing a Python object", mark,
522522
"module %r is not imported" % module_name.encode('utf-8'), mark)
523523
module = sys.modules[module_name]

lib/yaml/loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, stream):
5151
# UnsafeLoader is the same as Loader (which is and was always unsafe on
5252
# untrusted input). Use of either Loader or UnsafeLoader should be rare, since
5353
# FullLoad should be able to load almost all YAML safely. Loader is left intact
54-
# to ensure backwards compatability.
54+
# to ensure backwards compatibility.
5555
class UnsafeLoader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
5656

5757
def __init__(self, stream):

lib3/yaml/constructor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ def find_python_module(self, name, mark, unsafe=False):
513513
except ImportError as exc:
514514
raise ConstructorError("while constructing a Python module", mark,
515515
"cannot find module %r (%s)" % (name, exc), mark)
516-
if not name in sys.modules:
516+
if name not in sys.modules:
517517
raise ConstructorError("while constructing a Python module", mark,
518518
"module %r is not imported" % name, mark)
519519
return sys.modules[name]
@@ -533,7 +533,7 @@ def find_python_name(self, name, mark, unsafe=False):
533533
except ImportError as exc:
534534
raise ConstructorError("while constructing a Python object", mark,
535535
"cannot find module %r (%s)" % (module_name, exc), mark)
536-
if not module_name in sys.modules:
536+
if module_name not in sys.modules:
537537
raise ConstructorError("while constructing a Python object", mark,
538538
"module %r is not imported" % module_name, mark)
539539
module = sys.modules[module_name]

lib3/yaml/loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, stream):
5151
# UnsafeLoader is the same as Loader (which is and was always unsafe on
5252
# untrusted input). Use of either Loader or UnsafeLoader should be rare, since
5353
# FullLoad should be able to load almost all YAML safely. Loader is left intact
54-
# to ensure backwards compatability.
54+
# to ensure backwards compatibility.
5555
class UnsafeLoader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
5656

5757
def __init__(self, stream):

0 commit comments

Comments
 (0)