summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--astroid/as_string.py2
-rw-r--r--astroid/brain/brain_gi.py2
-rw-r--r--astroid/brain/brain_namedtuple_enum.py2
-rw-r--r--astroid/inference.py4
-rw-r--r--astroid/mixins.py2
-rw-r--r--astroid/modutils.py20
-rw-r--r--astroid/node_classes.py20
-rw-r--r--astroid/raw_building.py2
-rw-r--r--astroid/test_utils.py2
-rw-r--r--astroid/tests/unittest_builder.py6
-rw-r--r--astroid/tests/unittest_inference.py2
-rw-r--r--astroid/tests/unittest_nodes.py2
-rw-r--r--astroid/tests/unittest_protocols.py2
-rw-r--r--astroid/tests/unittest_regrtest.py2
-rw-r--r--astroid/tests/unittest_scoped_nodes.py2
-rw-r--r--astroid/tests/unittest_transforms.py2
-rw-r--r--doc/source/extending.rst2
-rw-r--r--doc/source/inference.rst6
-rw-r--r--pylintrc2
20 files changed, 50 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index 40721dc1..571673eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,7 +81,7 @@ Change log for the astroid package (used to be astng)
from an extension module).
* pkg_resources brain tips are a bit more specific,
- by specifiying proper returns.
+ by specifying proper returns.
* The slots() method conflates all the slots from the ancestors
into a list of current and parent slots.
@@ -441,14 +441,14 @@ Change log for the astroid package (used to be astng)
Discard will use Expr under the hood and the implemented visit_discard
in checkers will be called with Expr nodes instead. The AST does not
contain the old nodes, only the interoperability between them hides this
- fact. Recommandations to move to the new nodes are emitted accordingly,
+ fact. Recommendations to move to the new nodes are emitted accordingly,
the old names will be removed in astroid 2.0.
* Add support for understanding class creation using `type.__new__(mcs, name, bases, attrs)``
Until now, inferring this kind of calls resulted in Instances, not in classes,
since astroid didn't understand that the presence of the metaclass in the call
- leads to a class creationg, not to an instance creation.
+ leads to a class creating, not to an instance creation.
* Understand the `slice` builtin. Closes issue #184.
@@ -561,7 +561,7 @@ Change log for the astroid package (used to be astng)
2014-11-20 -- 1.3.0
- * Fix a maximum recursion error occured during the inference,
+ * Fix a maximum recursion error occurred during the inference,
where statements with the same name weren't filtered properly.
Closes pylint issue #295.
@@ -662,7 +662,7 @@ Change log for the astroid package (used to be astng)
most things there are for pylint/astroid only and we want to be
able to fix them without requiring a new logilab.common release
- * Fix names grabed using wildcard import in "absolute import mode"
+ * Fix names grabbed using wildcard import in "absolute import mode"
(ie with absolute_import activated from the __future__ or with
python 3). Fix pylint issue #58.
@@ -812,7 +812,7 @@ Change log for the astroid package (used to be astng)
* #74746: should return empty module when __main__ is imported (patch by
google)
- * #74748: getitem protocal return constant value instead of a Const node
+ * #74748: getitem protocol return constant value instead of a Const node
(patch by google)
* #77188: support lgc.decorators.classproperty
@@ -829,7 +829,7 @@ Change log for the astroid package (used to be astng)
* #70497: Crash on AttributeError: 'NoneType' object has no attribute '_infer_name'
- * #70381: IndendationError in import causes crash
+ * #70381: IndentationError in import causes crash
* #70565: absolute imports treated as relative (patch by Jacek Konieczny)
@@ -892,7 +892,7 @@ Change log for the astroid package (used to be astng)
2010-09-10 -- 0.20.2
* fix astng building bug: we've to set module.package flag at the node
- creation time otherwise we'll miss this information when infering relative
+ creation time otherwise we'll miss this information when inferring relative
import during the build process (this should fix for instance some problems
with numpy)
diff --git a/astroid/as_string.py b/astroid/as_string.py
index 6499b03a..08bee542 100644
--- a/astroid/as_string.py
+++ b/astroid/as_string.py
@@ -3,7 +3,7 @@
"""This module renders Astroid nodes as string:
-* :func:`to_code` function return equivalent (hopefuly valid) python string
+* :func:`to_code` function return equivalent (hopefully valid) python string
* :func:`dump` function return an internal representation of nodes found
in the tree, useful for debugging or understanding the tree structure
diff --git a/astroid/brain/brain_gi.py b/astroid/brain/brain_gi.py
index 9b65d204..059b5276 100644
--- a/astroid/brain/brain_gi.py
+++ b/astroid/brain/brain_gi.py
@@ -67,7 +67,7 @@ def _gi_build_stub(parent):
ret = ""
if constants:
- ret += "# %s contants\n\n" % parent.__name__
+ ret += "# %s constants\n\n" % parent.__name__
for name in sorted(constants):
if name[0].isdigit():
# GDK has some busted constant names like
diff --git a/astroid/brain/brain_namedtuple_enum.py b/astroid/brain/brain_namedtuple_enum.py
index 2ca00a5e..c91357a9 100644
--- a/astroid/brain/brain_namedtuple_enum.py
+++ b/astroid/brain/brain_namedtuple_enum.py
@@ -78,7 +78,7 @@ def infer_func_form(node, base_type, context=None, enum=False):
except (AttributeError, exceptions.InferenceError):
raise UseInferenceDefault()
- # If we can't iner the name of the class, don't crash, up to this point
+ # If we can't infer the name of the class, don't crash, up to this point
# we know it is a namedtuple anyway.
name = name or 'Uninferable'
# we want to return a Class node instance with proper attributes set
diff --git a/astroid/inference.py b/astroid/inference.py
index a6c16cad..0de23a60 100644
--- a/astroid/inference.py
+++ b/astroid/inference.py
@@ -648,7 +648,7 @@ nodes.BinOp._infer = infer_binop
def _infer_augassign(self, context=None):
- """Inferrence logic for augmented binary operations."""
+ """Inference logic for augmented binary operations."""
if context is None:
context = contextmod.InferenceContext()
@@ -660,7 +660,7 @@ def _infer_augassign(self, context=None):
# TODO(cpopa): if we have A() * A(), trying to infer
# the rhs with the same context will result in an
- # inferrence error, so we create another context for it.
+ # inference error, so we create another context for it.
# This is a bug which should be fixed in InferenceContext at some point.
rhs_context = context.clone()
rhs_context.path = set()
diff --git a/astroid/mixins.py b/astroid/mixins.py
index 2241fb44..1d7d9ee4 100644
--- a/astroid/mixins.py
+++ b/astroid/mixins.py
@@ -34,7 +34,7 @@ class FilterStmtsMixin(object):
"""Mixin for statement filtering and assignment type"""
def _get_filtered_stmts(self, _, node, _stmts, mystmt):
- """method used in _filter_stmts to get statemtents and trigger break"""
+ """method used in _filter_stmts to get statements and trigger break"""
if self.statement() is mystmt:
# original node's statement is the assignment, only keep
# current node (gen exp, list comp)
diff --git a/astroid/modutils.py b/astroid/modutils.py
index 31aa7d2a..fea36657 100644
--- a/astroid/modutils.py
+++ b/astroid/modutils.py
@@ -206,11 +206,11 @@ def load_module_from_name(dotted_name, path=None, use_sys=True):
def load_module_from_modpath(parts, path=None, use_sys=1):
- """Load a python module from its splitted name.
+ """Load a python module from its split name.
:type parts: list(str) or tuple(str)
:param parts:
- python name of a module or package splitted on '.'
+ python name of a module or package split on '.'
:type path: list or None
:param path:
@@ -327,8 +327,8 @@ def modpath_from_file_with_callback(filename, extrapath=None, is_package_cb=None
def modpath_from_file(filename, extrapath=None):
- """given a file path return the corresponding splitted module's name
- (i.e name of a module or package splitted on '.')
+ """given a file path return the corresponding split module's name
+ (i.e name of a module or package split on '.')
:type filename: str
:param filename: file's path for which we want the module's name
@@ -336,7 +336,7 @@ def modpath_from_file(filename, extrapath=None):
:type extrapath: dict
:param extrapath:
optional extra search path, with path as key and package name for the path
- as value. This is usually useful to handle package splitted in multiple
+ as value. This is usually useful to handle package split in multiple
directories using __path__ trick.
@@ -344,7 +344,7 @@ def modpath_from_file(filename, extrapath=None):
if the corresponding module's name has not been found
:rtype: list(str)
- :return: the corresponding splitted module's name
+ :return: the corresponding split module's name
"""
return modpath_from_file_with_callback(filename, extrapath, check_modpath_has_init)
@@ -353,13 +353,13 @@ def file_from_modpath(modpath, path=None, context_file=None):
return file_info_from_modpath(modpath, path, context_file).location
def file_info_from_modpath(modpath, path=None, context_file=None):
- """given a mod path (i.e. splitted module / package name), return the
+ """given a mod path (i.e. split module / package name), return the
corresponding file, giving priority to source file over precompiled
file if it exists
:type modpath: list or tuple
:param modpath:
- splitted module's name (i.e name of a module or package splitted
+ split module's name (i.e name of a module or package split
on '.')
(this means explicit relative imports that start with dots have
empty strings in this list!)
@@ -599,7 +599,7 @@ def is_relative(modname, from_file):
# internal only functions #####################################################
def _spec_from_modpath(modpath, path=None, context=None):
- """given a mod path (i.e. splitted module / package name), return the
+ """given a mod path (i.e. split module / package name), return the
corresponding spec
this function is used internally, see `file_from_modpath`'s
@@ -789,7 +789,7 @@ def _find_spec(modpath, path=None):
:type modpath: list or tuple
:param modpath:
- splitted module's name (i.e name of a module or package splitted
+ split module's name (i.e name of a module or package split
on '.'), with leading empty strings for explicit relative import
:type path: list or None
diff --git a/astroid/node_classes.py b/astroid/node_classes.py
index 4aacde61..a3effaa2 100644
--- a/astroid/node_classes.py
+++ b/astroid/node_classes.py
@@ -51,7 +51,7 @@ def unpack_infer(stmt, context=None):
# Explicit StopIteration to return error information, see comment
# in raise_if_nothing_inferred.
raise StopIteration(dict(node=stmt, context=context))
- # else, infer recursivly, except Uninferable object that should be returned as is
+ # else, infer recursively, except Uninferable object that should be returned as is
for inferred in stmt.infer(context):
if inferred is util.Uninferable:
yield inferred
@@ -99,11 +99,11 @@ def are_exclusive(stmt1, stmt2, exceptions=None): # pylint: disable=redefined-ou
c2attr, c2node = node.locate_child(previous)
c1attr, c1node = node.locate_child(children[node])
if c1node is not c2node:
- first_in_body_catched_by_handlers = (
+ first_in_body_caught_by_handlers = (
c2attr == 'handlers'
and c1attr == 'body'
and previous.catch(exceptions))
- second_in_body_catched_by_handlers = (
+ second_in_body_caught_by_handlers = (
c2attr == 'body'
and c1attr == 'handlers'
and children[node].catch(exceptions))
@@ -111,8 +111,8 @@ def are_exclusive(stmt1, stmt2, exceptions=None): # pylint: disable=redefined-ou
c2attr == 'handlers' and c1attr == 'orelse')
second_in_else_other_in_handlers = (
c2attr == 'orelse' and c1attr == 'handlers')
- if any((first_in_body_catched_by_handlers,
- second_in_body_catched_by_handlers,
+ if any((first_in_body_caught_by_handlers,
+ second_in_body_caught_by_handlers,
first_in_else_other_in_handlers,
second_in_else_other_in_handlers)):
return True
@@ -727,8 +727,8 @@ class LookupMixIn(object):
optional_assign = assign_type.optional_assign
if optional_assign and assign_type.parent_of(self):
- # we are inside a loop, loop var assigment is hidding previous
- # assigment
+ # we are inside a loop, loop var assignment is hiding previous
+ # assignment
_stmts = [node]
_stmt_parents = [stmt.parent]
continue
@@ -745,7 +745,7 @@ class LookupMixIn(object):
# both statements are not at the same block level
continue
# if currently visited node is following previously considered
- # assignement and both are not exclusive, we can drop the
+ # assignment and both are not exclusive, we can drop the
# previous one. For instance in the following code ::
#
# if a:
@@ -765,7 +765,7 @@ class LookupMixIn(object):
#
# moreover, on loop assignment types, assignment won't
# necessarily be done if the loop has no iteration, so we don't
- # want to clear previous assigments if any (hence the test on
+ # want to clear previous assignments if any (hence the test on
# optional_assign)
if not (optional_assign or are_exclusive(_stmts[pindex], node)):
del _stmt_parents[pindex]
@@ -1809,7 +1809,7 @@ class While(mixins.BlockRangeMixIn, Statement):
return self.test.tolineno
def block_range(self, lineno):
- """handle block line numbers range for for and while statements"""
+ """handle block line numbers range for and while statements"""
return self. _elsed_block_range(lineno, self.orelse)
diff --git a/astroid/raw_building.py b/astroid/raw_building.py
index 24127d49..4a1ab0a8 100644
--- a/astroid/raw_building.py
+++ b/astroid/raw_building.py
@@ -311,7 +311,7 @@ class InspectBuilder(object):
attach_const_node(node, name, member)
elif inspect.isroutine(member):
# This should be called for Jython, where some builtin
- # methods aren't catched by isbuiltin branch.
+ # methods aren't caught by isbuiltin branch.
_build_from_function(node, name, member, self._module)
else:
# create an empty node so that the name is actually defined
diff --git a/astroid/test_utils.py b/astroid/test_utils.py
index a67576a0..a4b91c58 100644
--- a/astroid/test_utils.py
+++ b/astroid/test_utils.py
@@ -110,7 +110,7 @@ def extract_node(code, module_name=''):
>>> def meth(self): #@
>>> pass
- The funcion object 'meth' will be extracted.
+ The function object 'meth' will be extracted.
Expressions:
To extract arbitrary expressions, surround them with the fake
diff --git a/astroid/tests/unittest_builder.py b/astroid/tests/unittest_builder.py
index 471a1fe7..78a489e5 100644
--- a/astroid/tests/unittest_builder.py
+++ b/astroid/tests/unittest_builder.py
@@ -745,13 +745,13 @@ class TestGuessEncoding(unittest.TestCase):
self.assertIsNone(e)
def test_wrong_coding(self):
- # setting "coding" varaible
+ # setting "coding" variable
e = self.guess_encoding("coding = UTF-8")
self.assertIsNone(e)
- # setting a dictionnary entry
+ # setting a dictionary entry
e = self.guess_encoding("coding:UTF-8")
self.assertIsNone(e)
- # setting an arguement
+ # setting an argument
e = self.guess_encoding("def do_something(a_word_with_coding=None):")
self.assertIsNone(e)
diff --git a/astroid/tests/unittest_inference.py b/astroid/tests/unittest_inference.py
index ae076b97..448b5c16 100644
--- a/astroid/tests/unittest_inference.py
+++ b/astroid/tests/unittest_inference.py
@@ -3828,7 +3828,7 @@ class ArgumentsTest(unittest.TestCase):
value = self._get_dict_value(inferred)
self.assertEqual(value, expected_value)
- def test_kwargs_are_overriden(self):
+ def test_kwargs_are_overridden(self):
ast_nodes = test_utils.extract_node('''
def test(f):
return f
diff --git a/astroid/tests/unittest_nodes.py b/astroid/tests/unittest_nodes.py
index fb54fabf..28cd95b1 100644
--- a/astroid/tests/unittest_nodes.py
+++ b/astroid/tests/unittest_nodes.py
@@ -438,7 +438,7 @@ class ConstNodeTest(unittest.TestCase):
class NameNodeTest(unittest.TestCase):
def test_assign_to_True(self):
- """test that True and False assignements don't crash"""
+ """test that True and False assignments don't crash"""
code = """
True = False
def hello(False):
diff --git a/astroid/tests/unittest_protocols.py b/astroid/tests/unittest_protocols.py
index 2ba9ef3b..652d9aab 100644
--- a/astroid/tests/unittest_protocols.py
+++ b/astroid/tests/unittest_protocols.py
@@ -123,7 +123,7 @@ class ProtocolTests(unittest.TestCase):
# Too many lhs values
self._helper_starred_inference_error("a, *b, c = (1, 2) #@")
# This could be solved properly, but it complicates needlessly the
- # code for assigned_stmts, without oferring real benefit.
+ # code for assigned_stmts, without offering real benefit.
self._helper_starred_inference_error(
"(*a, b), (c, *d) = (1, 2, 3), (4, 5, 6) #@")
diff --git a/astroid/tests/unittest_regrtest.py b/astroid/tests/unittest_regrtest.py
index 0dbc1670..6599faa7 100644
--- a/astroid/tests/unittest_regrtest.py
+++ b/astroid/tests/unittest_regrtest.py
@@ -120,7 +120,7 @@ class A(gobject.GObject):
def test_numpy_crash(self):
"""test don't crash on numpy"""
- #a crash occured somewhere in the past, and an
+ #a crash occurred somewhere in the past, and an
# InferenceError instead of a crash was better, but now we even infer!
try:
import numpy # pylint: disable=unused-variable
diff --git a/astroid/tests/unittest_scoped_nodes.py b/astroid/tests/unittest_scoped_nodes.py
index 6882f9bc..41f7b280 100644
--- a/astroid/tests/unittest_scoped_nodes.py
+++ b/astroid/tests/unittest_scoped_nodes.py
@@ -739,7 +739,7 @@ class ClassNodeTest(ModuleLoader, unittest.TestCase):
method_locals = klass2.local_attr('method')
self.assertEqual(len(method_locals), 1)
self.assertEqual(method_locals[0].name, 'method')
- self.assertRaises(AttributeInferenceError, klass2.local_attr, 'nonexistant')
+ self.assertRaises(AttributeInferenceError, klass2.local_attr, 'nonexistent')
methods = {m.name for m in klass2.methods()}
self.assertTrue(methods.issuperset(expected_methods))
diff --git a/astroid/tests/unittest_transforms.py b/astroid/tests/unittest_transforms.py
index 6960c4b1..75196855 100644
--- a/astroid/tests/unittest_transforms.py
+++ b/astroid/tests/unittest_transforms.py
@@ -135,7 +135,7 @@ class TestTransforms(unittest.TestCase):
def test_transforms_are_separated(self):
# Test that the transforming is done at a separate
# step, which means that we are not doing inference
- # on a partially constructred tree anymore, which was the
+ # on a partially constructed tree anymore, which was the
# source of crashes in the past when certain inference rules
# were used in a transform.
def transform_function(node):
diff --git a/doc/source/extending.rst b/doc/source/extending.rst
index 946d0116..2850c626 100644
--- a/doc/source/extending.rst
+++ b/doc/source/extending.rst
@@ -10,7 +10,7 @@ attributes.
Modifications in the AST are now possible using the using the generic
transformation API. You can find examples in the `brain/`
-subdirectory, which are taken from the the `pylint-brain`_ project.
+subdirectory, which are taken from the `pylint-brain`_ project.
Transformation functions are registered using the `register_transform` method of
the Astroid manager:
diff --git a/doc/source/inference.rst b/doc/source/inference.rst
index 7fed194f..e803a1dd 100644
--- a/doc/source/inference.rst
+++ b/doc/source/inference.rst
@@ -25,7 +25,7 @@ execution branches.
How does it work ?
------------------
-.. todo :: double chek this :func:`infer` is monkey-patched point
+.. todo :: double check this :func:`infer` is monkey-patched point
The :meth:`NodeNG.infer` method either delegates the actual inference
to the instance specific method :meth:`NodeNG._explicit_inference`
@@ -66,7 +66,7 @@ on several more global objects, mainly :
:class:`InferenceContext`
Instances of this class can be passed to the :meth:`infer` methods
- to convey aditionnal information on the context of the current
+ to convey additional information on the context of the current
node, and especially the current scope.
.. todo:: Write something about :class:`Scope` objects and
@@ -76,7 +76,7 @@ on several more global objects, mainly :
API documentation
=================
-Here is the annotaded API documentation extracted from the source code
+Here is the annotated API documentation extracted from the source code
of the :mod:`inference`.
.. todo:: actually annotate the doc to structure its approach
diff --git a/pylintrc b/pylintrc
index 913f81d1..934a6197 100644
--- a/pylintrc
+++ b/pylintrc
@@ -99,7 +99,7 @@ disable=fixme,invalid-name, missing-docstring, too-few-public-methods,
# all over the place changes the aesthetics when these methods
# are following a local pattern (visit methods for instance).
no-self-use,
- # API requirements in most of the occurences
+ # API requirements in most of the occurrences
unused-argument,
# Not very useful when it warns about imports.
duplicate-code,