Skip to content

Commit

Permalink
Merge pull request #527 from SpiNNakerManchester/pylint_fixes
Browse files Browse the repository at this point in the history
Minor fixes to get rid of pylint spelling cautions
  • Loading branch information
rowleya committed Oct 20, 2023
2 parents 234b9dd + 72de273 commit 0614953
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 149 deletions.
1 change: 1 addition & 0 deletions .pylint_dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ precompression
Navaridas
obj
subobj
xy
2 changes: 1 addition & 1 deletion pacman/model/graphs/common/mdslice.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def as_slice(self):
@overrides(Slice.get_slice, extend_doc=False)
def get_slice(self, n):
"""
Get a slice in the `n`'th dimension
Get a slice in the `n`'Th dimension
:param int n: The 0-indexed dimension to get the shape of
:type: slice
Expand Down
2 changes: 1 addition & 1 deletion pacman/model/graphs/common/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def as_slice(self):

def get_slice(self, n):
"""
Get a slice in the `n`'th dimension.
Get a slice in the `n`'Th dimension.
:param int n: Must be 0
:type: slice
Expand Down
2 changes: 1 addition & 1 deletion pacman/model/resources/variable_sdram.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, fixed_sdram, per_timestep_sdram):
"""
:param fixed_sdram:
The amount of SDRAM (in bytes) that represents static overhead
:type dtcm: int or numpy.integer
:type fixed_sdram: int or numpy.integer
:param per_timestep_sdram:
The amount of SDRAM (in bytes) required per timestep.
Often represents the space to record a timestep.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ def __hash__(self):

@abstractmethod
def __repr__(self):
"""repr"""
""" String representation of the table """
6 changes: 3 additions & 3 deletions pacman/operations/router_algorithms/application_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,14 +808,14 @@ def _path_without_loops(start_xy, nodes):
return nodes


def _is_ok(coord, node, machine):
def _is_ok(xy, node, machine):
"""
:param tuple(int, int) coord:
:param tuple(int, int) xy:
:param tuple(int,tuple(int, int)) node:
:param ~spinn_machine.Machine machine:
:rtype: bool
"""
c_x, c_y = coord
c_x, c_y = xy
direction, (n_x, n_y) = node
if machine.is_link_at(c_x, c_y, direction):
if machine.is_chip_at(n_x, n_y):
Expand Down
5 changes: 0 additions & 5 deletions pacman/operations/router_algorithms/basic_dijkstra_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@


class _NodeInfo(object):
"""
:ivar list(~spinn_machine.Link) neighbours:
:ivar list(float) bws:
:ivar list(float) weights:
"""
__slots__ = ["neighbours", "bws", "weights"]

def __init__(self):
Expand Down
8 changes: 4 additions & 4 deletions pacman/operations/router_compressors/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ def __eq__(self, other):
self.spinnaker_route == other.spinnaker_route)

@staticmethod
def from_MulticastRoutingEntry(mre):
def from_MulticastRoutingEntry(source):
"""
:param ~spinn_machine.MulticastRoutingEntry mre:
:param ~spinn_machine.MulticastRoutingEntry source:
:rtype: Entry
"""
# Yes I know using _params is ugly but this is for speed
# pylint:disable=protected-access
return Entry(
mre._routing_entry_key, mre._mask, mre._defaultable,
mre._spinnaker_route)
source._routing_entry_key, source._mask, source._defaultable,
source._spinnaker_route)

def to_MulticastRoutingEntry(self):
"""
Expand Down
3 changes: 1 addition & 2 deletions pacman/utilities/utility_objs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from .field import Field, SUPPORTED_TAGS
from .chip_counter import ChipCounter

__all__ = ["Field", "SUPPORTED_TAGS", "ChipCounter"]
__all__ = ["ChipCounter"]
131 changes: 0 additions & 131 deletions pacman/utilities/utility_objs/field.py

This file was deleted.

0 comments on commit 0614953

Please sign in to comment.