Skip to content

Commit

Permalink
chore(docs): fix typos (#242)
Browse files Browse the repository at this point in the history
Found via `codespell -S docs -L ue,hav,ot`
  • Loading branch information
kianmeng authored Mar 26, 2023
1 parent 5061d86 commit 663defc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion radon/cli/harvest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Harvester(object):
implemented.
3. **Reporting**: the methods *as_json* and *as_xml* return a string
with the corrisponding format. The method *to_terminal* is a generator
with the corresponding format. The method *to_terminal* is a generator
that yields the lines to be printed in the terminal.
This class is meant to be subclasses and cannot be used directly, since
Expand Down
4 changes: 2 additions & 2 deletions radon/cli/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _open(path):
)

if sys.version_info[:2] < (2, 7):
# This open function treats line-endings slighly differently than
# This open function treats line-endings slightly differently than
# io.open. But the latter is implemented in pure Python in version 2.6,
# so we'll live with the differences instead of taking a hit on the
# speed. Radon does a lot of file reading, so the difference in speed
Expand Down Expand Up @@ -447,7 +447,7 @@ def dict_to_codeclimate_issues(results, threshold='B'):


def cc_to_terminal(results, show_complexity, min, max, total_average):
'''Transfom Cyclomatic Complexity results into a 3-elements tuple:
'''Transform Cyclomatic Complexity results into a 3-elements tuple:
``(res, total_cc, counted)``
Expand Down
2 changes: 1 addition & 1 deletion radon/tests/test_complexity_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ def inner(n):
'''
try:
1 / 0
except ZeroDivisonError:
except ZeroDivisionError:
print
except TypeError:
pass
Expand Down
6 changes: 3 additions & 3 deletions radon/visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ def code2ast(source):
'''Convert a string object into an AST object.
This function is retained for backwards compatibility, but it no longer
attemps any conversions. It's equivalent to a call to ``ast.parse``.
attempts any conversions. It's equivalent to a call to ``ast.parse``.
'''
return ast.parse(source)


class Function(BaseFunc):
'''Object represeting a function block.'''
'''Object representing a function block.'''

@property
def letter(self):
Expand Down Expand Up @@ -127,7 +127,7 @@ def get_name(obj):

@classmethod
def from_code(cls, code, **kwargs):
'''Instanciate the class from source code (string object). The
'''Instantiate the class from source code (string object). The
`**kwargs` are directly passed to the `ast.NodeVisitor` constructor.
'''
return cls.from_ast(code2ast(code), **kwargs)
Expand Down

0 comments on commit 663defc

Please sign in to comment.