diff options
| author | Kian Meng, Ang <kianmeng.ang@gmail.com> | 2021-12-13 16:04:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-13 09:04:26 +0100 |
| commit | c28bf74283500287e04fb9f5fcc739edc72cd7cd (patch) | |
| tree | 3e322b8f5825a58cfee26f53c2da2e4c3fbfedc2 | |
| parent | 037b75dc4edc80086b214028f6cc5f53a851872f (diff) | |
| download | astroid-git-c28bf74283500287e04fb9f5fcc739edc72cd7cd.tar.gz | |
Fix typos (#1288)
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | astroid/brain/brain_ctypes.py | 2 | ||||
| -rw-r--r-- | astroid/builder.py | 2 | ||||
| -rw-r--r-- | astroid/context.py | 2 | ||||
| -rw-r--r-- | astroid/inference.py | 2 | ||||
| -rw-r--r-- | astroid/nodes/node_classes.py | 2 | ||||
| -rw-r--r-- | astroid/nodes/scoped_nodes.py | 2 | ||||
| -rw-r--r-- | doc/extending.rst | 2 | ||||
| -rw-r--r-- | pylintrc | 2 | ||||
| -rw-r--r-- | tests/unittest_brain.py | 4 | ||||
| -rw-r--r-- | tests/unittest_builder.py | 2 | ||||
| -rw-r--r-- | tests/unittest_inference.py | 2 | ||||
| -rw-r--r-- | tests/unittest_protocols.py | 2 |
13 files changed, 15 insertions, 15 deletions
@@ -890,7 +890,7 @@ Release date: 2020-04-27 * Added transform for ``scipy.gaussian`` -* Add suport for inferring properties. +* Add support for inferring properties. * Added a brain for ``responses`` @@ -2737,7 +2737,7 @@ Release date: 2009-12-18 bad inference of function call) * fix #18953: inference fails with augmented assignment (special case for augmented - assignement in infer_ass method) + assignment in infer_ass method) * fix #13944: false positive for class/instance attributes (Instance.getattr should return assign nodes on instance classes as well as instance. diff --git a/astroid/brain/brain_ctypes.py b/astroid/brain/brain_ctypes.py index 26472e12..493b0be2 100644 --- a/astroid/brain/brain_ctypes.py +++ b/astroid/brain/brain_ctypes.py @@ -3,7 +3,7 @@ Astroid hooks for ctypes module. Inside the ctypes module, the value class is defined inside the C coded module _ctypes. -Thus astroid doesn't know that the value member is a bultin type +Thus astroid doesn't know that the value member is a builtin type among float, int, bytes or str. """ import sys diff --git a/astroid/builder.py b/astroid/builder.py index ee8fa78e..cfa8525e 100644 --- a/astroid/builder.py +++ b/astroid/builder.py @@ -165,7 +165,7 @@ class AstroidBuilder(raw_building.InspectBuilder): return module def _data_build(self, data, modname, path): - """Build tree node from data and add some informations""" + """Build tree node from data and add some information""" try: node, parser_module = _parse_string(data, type_comments=True) except (TypeError, ValueError, SyntaxError) as exc: diff --git a/astroid/context.py b/astroid/context.py index 4dbebcd7..da1e2916 100644 --- a/astroid/context.py +++ b/astroid/context.py @@ -95,7 +95,7 @@ class InferenceContext: @property def nodes_inferred(self): """ - Number of nodes inferred in this context and all its clones/decendents + Number of nodes inferred in this context and all its clones/descendents Wrap inner value in a mutable cell to allow for mutating a class variable in the presence of __slots__ diff --git a/astroid/inference.py b/astroid/inference.py index 2f9ed290..d6d12491 100644 --- a/astroid/inference.py +++ b/astroid/inference.py @@ -1054,7 +1054,7 @@ def _cached_generator(func, instance, args, kwargs, _cache={}): # noqa: B006 # When inferring a property, we instantiate a new `objects.Property` object, # which in turn, because it inherits from `FunctionDef`, sets itself in the locals -# of the wrapping frame. This means that everytime we infer a property, the locals +# of the wrapping frame. This means that every time we infer a property, the locals # are mutated with a new instance of the property. This is why we cache the result # of the function's inference. @_cached_generator diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index e06a6a54..f7abb6e3 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py @@ -880,7 +880,7 @@ class Arguments(mixins.AssignTypeMixin, NodeNG): self.args: typing.Optional[typing.List[AssignName]] """The names of the required arguments. - Can be None if the assosciated function does not have a retrievable + Can be None if the associated function does not have a retrievable signature and the arguments are therefore unknown. This happens with builtin functions implemented in C. """ diff --git a/astroid/nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes.py index 25824d98..0c745a4f 100644 --- a/astroid/nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes.py @@ -841,7 +841,7 @@ class Module(LocalsDictNodeNG): def public_names(self): """The list of the names that are publicly available in this module. - :returns: The list of publc names. + :returns: The list of public names. :rtype: list(str) """ return [name for name in self.keys() if not name.startswith("_")] diff --git a/doc/extending.rst b/doc/extending.rst index ab80115a..2580c10b 100644 --- a/doc/extending.rst +++ b/doc/extending.rst @@ -77,7 +77,7 @@ it for ``astroid.Call``, which is the node for function calls, so this now becom The next step would be to do the actual transformation, but before dwelving into that, let's see some important concepts that nodes in astroid have: -* they have a parent. Everytime we build a node, we have to provide a parent +* they have a parent. Every time we build a node, we have to provide a parent * most of the time they have a line number and a column offset as well @@ -84,7 +84,7 @@ confidence= # can either give multiple identifiers separated by comma (,) or put this # option multiple times (only on the command line, not in the configuration # file where it should appear only once).You can also use "--disable=all" to -# disable everything first and then reenable specific checks. For example, if +# disable everything first and then re-enable specific checks. For example, if # you want to run only the similarities checker, you can use "--disable=all # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes diff --git a/tests/unittest_brain.py b/tests/unittest_brain.py index ab009715..d38c0d79 100644 --- a/tests/unittest_brain.py +++ b/tests/unittest_brain.py @@ -2386,7 +2386,7 @@ class TestIsinstanceInference: ) def test_isinstance_str_true(self) -> None: - """Make sure isinstance can check bultin str types""" + """Make sure isinstance can check builtin str types""" assert _get_result("isinstance('a', str)") == "True" def test_isinstance_str_false(self) -> None: @@ -2847,7 +2847,7 @@ def test_infer_dict_from_keys() -> None: assert isinstance(inferred, astroid.Dict) assert inferred.items == [] - # Test inferrable values + # Test inferable values # from a dictionary's keys from_dict = astroid.extract_node( diff --git a/tests/unittest_builder.py b/tests/unittest_builder.py index 6b1fdfca..7dffbb72 100644 --- a/tests/unittest_builder.py +++ b/tests/unittest_builder.py @@ -285,7 +285,7 @@ class BuilderTest(unittest.TestCase): def test_missing_file(self) -> None: with self.assertRaises(AstroidBuildingError): - resources.build_file("data/inexistant.py") + resources.build_file("data/inexistent.py") def test_inspect_build0(self) -> None: """test astroid tree build from a living object""" diff --git a/tests/unittest_inference.py b/tests/unittest_inference.py index e660f7cb..89e9d59d 100644 --- a/tests/unittest_inference.py +++ b/tests/unittest_inference.py @@ -5593,7 +5593,7 @@ def test_limit_inference_result_amount() -> None: def test_attribute_inference_should_not_access_base_classes() -> None: - """attributes of classes should mask ancestor attribues""" + """attributes of classes should mask ancestor attributes""" code = """ type.__new__ #@ """ diff --git a/tests/unittest_protocols.py b/tests/unittest_protocols.py index 78626ece..bbe7289f 100644 --- a/tests/unittest_protocols.py +++ b/tests/unittest_protocols.py @@ -123,7 +123,7 @@ class ProtocolTests(unittest.TestCase): def test_assigned_stmts_starred_yes(self) -> None: # Not something iterable and known self._helper_starred_expected("a, *b = range(3) #@", Uninferable) - # Not something inferrable + # Not something inferable self._helper_starred_expected("a, *b = balou() #@", Uninferable) # In function, unknown. self._helper_starred_expected( |
