X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=code%2Fnetwork-generator%2Fnetwork_generation%2Fmodel%2Fpython%2Fcube.py;h=2c5ef063779d0d841efccee3fe77274998739903;hb=091313ef66ae97923fd970be160e01d46649a835;hp=0d4e2a348b64d8f14102345843af02a872e00fe0;hpb=a2b078aa43c03151b01b97b421ff1dc21b04c555;p=oam.git diff --git a/code/network-generator/network_generation/model/python/cube.py b/code/network-generator/network_generation/model/python/cube.py index 0d4e2a3..2c5ef06 100644 --- a/code/network-generator/network_generation/model/python/cube.py +++ b/code/network-generator/network_generation/model/python/cube.py @@ -14,7 +14,7 @@ # # inspired by http://www.redblobgames.com/grids/hexagons/ -#!/usr/bin/python +# !/usr/bin/python from network_generation.model.python.hexagon import Hex @@ -35,7 +35,8 @@ class Cube: def direction(direction: int) -> Hex: if direction < 0 or direction > 5: raise ValueError( - "Invalid direction. The direction value must be in the range of [0..5]." + "Invalid direction. The direction value must be" + + " in the range of [0..5]." ) return Cube.direction_vectors()[direction] @@ -55,7 +56,8 @@ class Cube: def ring(center: Hex, radius: int) -> list[Hex]: if not (radius > 0): raise ValueError( - "Invalid radius. The radius around the hex center must be greater than 0 rings." + "Invalid radius. The radius around the hex center must" + + " be greater than 0 rings." ) results: list[Hex] = [] hex: Hex = Cube.add(center, Cube.scale(Cube.direction(4), radius))