Skip to content

Commit

Permalink
small changes to avoid spelling exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Feb 12, 2024
1 parent db9b41c commit 2f155c7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions spinn_utilities/helpful_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ def lcm(*numbers) -> int:
GIGO: If any of the values are anything except positive `int` values
this function will either produce incorrect results or raise an exception.
:param numbers: The Positive integers to get the LCM for.
:param numbers:
The Positive integers to get the Lowest common multiple for.
This can be zero, one or more int values or
a singleton which is an iterator (possibly empty) of `int`\\s.
:return: the LCM, or 1 if `numbers` is empty or an empty iterator
:return: the Lowest common multiple,
or 1 if `numbers` is empty or an empty iterator
:rtype: int
:raises TypeError: If any value cannot be interpreted as an integer
:raises ZeroDivisionError: May be raised if one of the values is zero
Expand Down
2 changes: 1 addition & 1 deletion spinn_utilities/ranged/abstract_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def ids(self) -> Sequence[int]:
to create the view is maintained.
.. note::
If indexing into a view, you are picking the X'th ID.
If indexing into a view, you are picking the Nth ID.
So if the IDs are `[2,3,4,5]` the `view[2]` will be the data for
ID `4` and not `2`
Expand Down
2 changes: 1 addition & 1 deletion spinn_utilities/require_subclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class AbstractVirtual(object):
# The use of __class__ to enable super() to work is from:
# https://stackoverflow.com/a/43779009/301832
# The need to do this as a functional decorator is my own discovery;
# without it, some very weird interactions with metaclasses happen and I
# without it, some very weird interactions with meta classes happen and I
# really don't want to debug that stuff.

def decorate(target_class):
Expand Down
2 changes: 1 addition & 1 deletion spinn_utilities/safe_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SafeEval(object):
>>> import math
>>> def evil_func(x):
... print("HAHA!")
... print("Hello World!")
... return x/0.0
...
>>> eval_safely = SafeEval(math)
Expand Down

0 comments on commit 2f155c7

Please sign in to comment.