diff --git a/pacman/model/graphs/abstract_edge_partition.py b/pacman/model/graphs/abstract_edge_partition.py index c564842fe..f08f41a94 100644 --- a/pacman/model/graphs/abstract_edge_partition.py +++ b/pacman/model/graphs/abstract_edge_partition.py @@ -52,7 +52,7 @@ def __init__(self, identifier: str, self._allowed_edge_types = allowed_edge_types self._edges: OrderedSet[E] = OrderedSet() - def add_edge(self, edge: E): + def add_edge(self, edge: E) -> None: """ Add an edge to the edge partition. @@ -101,14 +101,14 @@ def n_edges(self) -> int: """ return len(self._edges) - def __repr__(self): + def __repr__(self) -> str: return (f"{self.__class__.__name__}(identifier={self.identifier}" f", n_edges={self.n_edges})") - def __str__(self): + def __str__(self) -> str: return self.__repr__() - def __contains__(self, edge): + def __contains__(self, edge: AbstractEdge) -> bool: """ Check if the edge is contained within this partition. diff --git a/pacman/model/graphs/abstract_multiple_partition.py b/pacman/model/graphs/abstract_multiple_partition.py index 8208a759d..9af7137f3 100644 --- a/pacman/model/graphs/abstract_multiple_partition.py +++ b/pacman/model/graphs/abstract_multiple_partition.py @@ -53,7 +53,7 @@ def __init__( "There were clones in your list of acceptable pre vertices") @overrides(AbstractEdgePartition.add_edge) - def add_edge(self, edge: E): + def add_edge(self, edge: E) -> None: # safety checks if edge.pre_vertex not in self._pre_vertices: raise PacmanValueError( diff --git a/pacman/model/graphs/abstract_single_source_partition.py b/pacman/model/graphs/abstract_single_source_partition.py index bcef6a4fc..7bbb1090a 100644 --- a/pacman/model/graphs/abstract_single_source_partition.py +++ b/pacman/model/graphs/abstract_single_source_partition.py @@ -44,7 +44,7 @@ def __init__( self._pre_vertex = pre_vertex @overrides(AbstractEdgePartition.add_edge) - def add_edge(self, edge: E): + def add_edge(self, edge: E) -> None: super().add_edge(edge) if edge.pre_vertex != self._pre_vertex: raise PacmanConfigurationException( diff --git a/pacman/model/graphs/abstract_vertex.py b/pacman/model/graphs/abstract_vertex.py index c588eb8bd..1689b4a97 100644 --- a/pacman/model/graphs/abstract_vertex.py +++ b/pacman/model/graphs/abstract_vertex.py @@ -48,7 +48,7 @@ def label(self) -> Optional[str]: """ return self._label - def set_label(self, label: str): + def set_label(self, label: str) -> None: """ Changes the label for a vertex *not yet added* to a graph. @@ -90,7 +90,8 @@ def get_fixed_location(self) -> Optional[ChipAndCore]: """ return self._fixed_location - def set_fixed_location(self, x: int, y: int, p: Optional[int] = None): + def set_fixed_location( + self, x: int, y: int, p: Optional[int] = None) -> None: """ Set the location where the vertex must be placed. diff --git a/pacman/model/graphs/application/application_edge_partition.py b/pacman/model/graphs/application/application_edge_partition.py index 87c410baf..f382100ae 100644 --- a/pacman/model/graphs/application/application_edge_partition.py +++ b/pacman/model/graphs/application/application_edge_partition.py @@ -41,6 +41,6 @@ def __init__(self, identifier: str, pre_vertex: ApplicationVertex): allowed_edge_types=ApplicationEdge) @overrides(AbstractSingleSourcePartition.add_edge) - def add_edge(self, edge: ApplicationEdge): + def add_edge(self, edge: ApplicationEdge) -> None: super().add_edge(edge) edge.post_vertex.add_incoming_edge(edge, self) diff --git a/pacman/model/graphs/application/application_vertex.py b/pacman/model/graphs/application/application_vertex.py index ba33ea5cc..a2645664b 100644 --- a/pacman/model/graphs/application/application_vertex.py +++ b/pacman/model/graphs/application/application_vertex.py @@ -87,10 +87,10 @@ def __init__( self._max_atoms_per_dimension_per_core: Optional[Tuple[int, ...]] self._set_max_atoms_per_dimension_per_core(max_atoms_per_core) - def __str__(self): - return self.label + def __str__(self) -> str: + return str(self.label) - def __repr__(self): + def __repr__(self) -> str: if self.get_fixed_location(): return (f"ApplicationVertex({self.label}," f" at{self.get_fixed_location()})") @@ -117,7 +117,7 @@ def splitter(self) -> AbstractSplitterCommon[Self]: return s @splitter.setter - def splitter(self, new_value: AbstractSplitterCommon[Self]): + def splitter(self, new_value: AbstractSplitterCommon[Self]) -> None: """ Sets the splitter object. Does not allow repeated settings. @@ -134,7 +134,7 @@ def splitter(self, new_value: AbstractSplitterCommon[Self]): self._splitter = new_value self._splitter.set_governed_app_vertex(self) - def remember_machine_vertex(self, machine_vertex: MV): + def remember_machine_vertex(self, machine_vertex: MV) -> None: """ Adds the machine vertex to the iterable returned by machine_vertices @@ -202,7 +202,8 @@ def machine_vertices(self) -> Collection[MV]: """ return self._machine_vertices - def __check_atoms_per_core(self): + def __check_atoms_per_core(self) -> None: + assert self._max_atoms_per_dimension_per_core is not None if (len(self._max_atoms_per_dimension_per_core) != len(self.atoms_shape)): raise ValueError( @@ -248,7 +249,7 @@ def get_max_atoms_per_dimension_per_core(self) -> Tuple[int, ...]: return self._max_atoms_per_dimension_per_core def _set_max_atoms_per_dimension_per_core( - self, new_value: Optional[Union[int, Tuple[int, ...]]]): + self, new_value: Optional[Union[int, Tuple[int, ...]]]) -> None: """ Set the maximum number of atoms per dimension per core. @@ -273,7 +274,7 @@ def _set_max_atoms_per_dimension_per_core( self._max_atoms_per_dimension_per_core = max_atoms_tuple def set_max_atoms_per_dimension_per_core( - self, new_value: Optional[Union[int, Tuple[int, ...]]]): + self, new_value: Optional[Union[int, Tuple[int, ...]]]) -> None: """ Set the maximum number of atoms per dimension per core. @@ -336,8 +337,8 @@ def get_fixed_key_and_mask( # pylint: disable=unused-argument return None - def add_incoming_edge( - self, edge: ApplicationEdge, partition: ApplicationEdgePartition): + def add_incoming_edge(self, edge: ApplicationEdge, + partition: ApplicationEdgePartition) -> None: """ Add an edge incoming to this vertex. This is ignored by default, but could be used to track incoming edges, and/or report faults. @@ -349,7 +350,8 @@ def add_incoming_edge( ~pacman.model.graphs.application.ApplicationEdgePartition """ - def get_key_ordered_indices(self, indices=None): + def get_key_ordered_indices( + self, indices: Optional[numpy.ndarray] = None) -> numpy.ndarray: """ Get indices of the vertex in the order that atoms appear when the vertex is split into cores as determined by max_atoms_per_core. When @@ -373,7 +375,7 @@ def get_key_ordered_indices(self, indices=None): atoms_per_core = self.get_max_atoms_per_dimension_per_core() remainders = numpy.array(indices) cum_per_core = 1 - cum_cores_per_dim = 1 + cum_cores_per_dim = 1.0 core_index = numpy.zeros(len(indices)) atom_index = numpy.zeros(len(indices)) for n in range(n_dims): @@ -403,7 +405,8 @@ def get_key_ordered_indices(self, indices=None): return ((core_index * self.get_max_atoms_per_core()) + atom_index).astype(numpy.uint32) - def get_raster_ordered_indices(self, indices): + def get_raster_ordered_indices( + self, indices: numpy.ndarray) -> numpy.ndarray: """ Convert indices from key order to raster order. @@ -441,7 +444,7 @@ def get_raster_ordered_indices(self, indices): return global_index.astype(numpy.uint32) - def has_fixed_location(self): + def has_fixed_location(self) -> bool: """ Check if this vertex or any machine vertex has a fixed location. diff --git a/pacman/model/graphs/common/chip_and_core.py b/pacman/model/graphs/common/chip_and_core.py index fb8de3e5e..39e0bc4d2 100644 --- a/pacman/model/graphs/common/chip_and_core.py +++ b/pacman/model/graphs/common/chip_and_core.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from typing import Optional +from typing import Any, Optional class ChipAndCore(object): @@ -72,12 +72,12 @@ def __repr__(self) -> str: else: return f"X:{self._x},Y:{self._y},P:{self._p}" - def __eq__(self, other) -> bool: + def __eq__(self, other: Any) -> bool: if not isinstance(other, ChipAndCore): return False return (self._x, self._y, self._p) == (other.x, other.y, other.p) - def __ne__(self, other) -> bool: + def __ne__(self, other: Any) -> bool: return not self.__eq__(other) def __hash__(self) -> int: diff --git a/pacman/model/graphs/common/mdslice.py b/pacman/model/graphs/common/mdslice.py index e60c6d3d9..b5c53350b 100644 --- a/pacman/model/graphs/common/mdslice.py +++ b/pacman/model/graphs/common/mdslice.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. from __future__ import annotations -from typing import Tuple, Union +from typing import Any, Tuple, Union import numpy from numpy.typing import NDArray from spinn_utilities.overrides import overrides @@ -119,7 +119,7 @@ def __str__(self) -> str: value += f"({a_slice.start}:{a_slice.stop})" return f"{self.lo_atom}{self._atoms_shape}{value}" - def __eq__(self, other) -> bool: + def __eq__(self, other: Any) -> bool: if not isinstance(other, MDSlice): return False if not super().__eq__(other): diff --git a/pacman/model/graphs/common/slice.py b/pacman/model/graphs/common/slice.py index 70bad8acb..34e4e5896 100644 --- a/pacman/model/graphs/common/slice.py +++ b/pacman/model/graphs/common/slice.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. from __future__ import annotations -from typing import Tuple, Union +from typing import Any, Tuple, Union import numpy from numpy.typing import NDArray from pacman.exceptions import PacmanValueError, PacmanTypeError @@ -170,10 +170,10 @@ def get_raster_ids(self) -> NDArray[numpy.integer]: """ return numpy.array(range(self._lo_atom, self._lo_atom + self._n_atoms)) - def __str__(self): + def __str__(self) -> str: return (f"({self.lo_atom}:{self.hi_atom})") - def __eq__(self, other): + def __eq__(self, other: Any) -> bool: if not isinstance(other, Slice): return False if self._lo_atom != other.lo_atom: @@ -185,7 +185,7 @@ def __eq__(self, other): return False return self._n_atoms == other.n_atoms - def __hash__(self): + def __hash__(self) -> int: # Slices will generally only be hashed in sets for the same Vertex return self._lo_atom diff --git a/pacman/model/graphs/machine/abstract_sdram_partition.py b/pacman/model/graphs/machine/abstract_sdram_partition.py index fc346a861..9ac21c94f 100644 --- a/pacman/model/graphs/machine/abstract_sdram_partition.py +++ b/pacman/model/graphs/machine/abstract_sdram_partition.py @@ -39,7 +39,7 @@ def sdram_base_address(self) -> int: raise NotImplementedError @sdram_base_address.setter - def sdram_base_address(self, new_value: int): + def sdram_base_address(self, new_value: int) -> None: raise NotImplementedError @abstractmethod diff --git a/pacman/model/graphs/machine/machine_edge.py b/pacman/model/graphs/machine/machine_edge.py index 44aa83b02..d6901520a 100644 --- a/pacman/model/graphs/machine/machine_edge.py +++ b/pacman/model/graphs/machine/machine_edge.py @@ -74,7 +74,7 @@ def post_vertex(self) -> MachineVertex: """ return self._post_vertex - def __repr__(self): + def __repr__(self) -> str: return ( f"MachineEdge(pre_vertex={self._pre_vertex}, " f"post_vertex={self._post_vertex}, label={self.label})") diff --git a/pacman/model/graphs/machine/machine_vertex.py b/pacman/model/graphs/machine/machine_vertex.py index 18a1aff41..1bed32413 100644 --- a/pacman/model/graphs/machine/machine_vertex.py +++ b/pacman/model/graphs/machine/machine_vertex.py @@ -109,18 +109,18 @@ def index(self) -> int: return self._index if self._index is not None else 0 @index.setter - def index(self, value: int): + def index(self, value: int) -> None: """ The index into the collection of machine vertices for an application vertex. """ self._index = value - def __str__(self): + def __str__(self) -> str: _l = self.label return self.__repr__() if _l is None else _l - def __repr__(self): + def __repr__(self) -> str: if self.get_fixed_location(): return (f"MachineVertex({self.label}, " f"at{self.get_fixed_location()})") diff --git a/pacman/model/graphs/machine/multicast_edge_partition.py b/pacman/model/graphs/machine/multicast_edge_partition.py index 4ea5e7d80..98909344c 100644 --- a/pacman/model/graphs/machine/multicast_edge_partition.py +++ b/pacman/model/graphs/machine/multicast_edge_partition.py @@ -36,6 +36,6 @@ def __init__(self, pre_vertex: MachineVertex, identifier: str): pre_vertex=pre_vertex, identifier=identifier, allowed_edge_types=MachineEdge) - def __repr__(self): + def __repr__(self) -> str: return (f"MulticastEdgePartition(pre_vertex={self.pre_vertex}," f" identifier={self.identifier})") diff --git a/pacman/model/graphs/machine/simple_machine_vertex.py b/pacman/model/graphs/machine/simple_machine_vertex.py index 04c2efc74..8958e1fdf 100644 --- a/pacman/model/graphs/machine/simple_machine_vertex.py +++ b/pacman/model/graphs/machine/simple_machine_vertex.py @@ -16,6 +16,8 @@ from spinn_utilities.overrides import overrides +from pacman.model.graphs.common import Slice +from pacman.model.graphs.application import ApplicationVertex from pacman.model.resources import AbstractSDRAM from pacman.model.resources import IPtagResource from pacman.model.resources import ReverseIPtagResource @@ -33,11 +35,12 @@ class SimpleMachineVertex(MachineVertex): """ __slots__ = ("_iptags", "_reverse_iptags", "_sdram") - def __init__(self, sdram, label=None, - app_vertex=None, vertex_slice=None, - iptags: Optional[Iterable[IPtagResource]] = None, - reverse_iptags: Optional[Iterable[ReverseIPtagResource]] - = None): + def __init__( + self, sdram: Optional[AbstractSDRAM], label:Optional[str]=None, + app_vertex: Optional[ApplicationVertex] = None, + vertex_slice: Optional[Slice]=None, + iptags: Optional[Iterable[IPtagResource]] = None, + reverse_iptags: Optional[Iterable[ReverseIPtagResource]] = None): super().__init__( label=label, app_vertex=app_vertex, vertex_slice=vertex_slice) self._sdram = sdram @@ -51,6 +54,7 @@ def __init__(self, sdram, label=None, @property @overrides(MachineVertex.sdram_required) def sdram_required(self) -> AbstractSDRAM: + assert self._sdram is not None return self._sdram @property diff --git a/pacman/model/resources/abstract_sdram.py b/pacman/model/resources/abstract_sdram.py index 06db3ad3c..07b896bd8 100644 --- a/pacman/model/resources/abstract_sdram.py +++ b/pacman/model/resources/abstract_sdram.py @@ -68,7 +68,7 @@ def __eq__(self, other: Any) -> bool: @abstractmethod def report(self, timesteps: Optional[int], indent: str = "", - preamble: str = "", target: Optional[TextIO] = None): + preamble: str = "", target: Optional[TextIO] = None) -> None: """ Writes a description of this SDRAM to the target. @@ -91,5 +91,5 @@ def short_str(self) -> str: """ raise NotImplementedError - def __str__(self): + def __str__(self) -> str: return f"SDRAM:{self.short_str}" diff --git a/pacman/model/resources/constant_sdram.py b/pacman/model/resources/constant_sdram.py index b05006f6f..2c122e2d4 100644 --- a/pacman/model/resources/constant_sdram.py +++ b/pacman/model/resources/constant_sdram.py @@ -64,7 +64,7 @@ def __add__(self, other: AbstractSDRAM) -> AbstractSDRAM: @overrides(AbstractSDRAM.report) def report(self, timesteps: Optional[int], indent: str = "", - preamble: str = "", target: Optional[TextIO] = None): + preamble: str = "", target: Optional[TextIO] = None) -> None: print(indent, preamble, f"Constant {self._sdram} bytes", file=target) @property diff --git a/pacman/model/resources/iptag_resource.py b/pacman/model/resources/iptag_resource.py index 4e6ea3206..96fd1e18b 100644 --- a/pacman/model/resources/iptag_resource.py +++ b/pacman/model/resources/iptag_resource.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from typing import Optional +from typing import Any, List, Optional class IPtagResource(object): @@ -112,13 +112,13 @@ def get_value(self): self._traffic_identifier ] - def __repr__(self): + def __repr__(self) -> str: return ( f"IPTagResource(ip_address={self._ip_address}, port={self._port}, " f"strip_sdp={self._strip_sdp}, tag={self._tag}, " f"traffic_identifier={self._traffic_identifier})") - def __eq__(self, other): + def __eq__(self, other: Any) ->bool: """ For unit tests *only* so __hash__ and __eq__ pairing not done! """ @@ -128,10 +128,10 @@ def __eq__(self, other): self._tag == other._tag and self._traffic_identifier == other._traffic_identifier) - def __hash__(self): + def __hash__(self) -> int: return hash(( self._ip_address, self._port, self._strip_sdp, self._tag, self._traffic_identifier)) - def __ne__(self, other): + def __ne__(self, other: Any) -> bool: return not self.__eq__(other) diff --git a/pacman/model/resources/multi_region_sdram.py b/pacman/model/resources/multi_region_sdram.py index 89a022412..1724b9436 100644 --- a/pacman/model/resources/multi_region_sdram.py +++ b/pacman/model/resources/multi_region_sdram.py @@ -57,7 +57,7 @@ def __init__(self) -> None: self._total: AbstractSDRAM = ConstantSDRAM(0) @property - def regions(self): + def regions(self) -> dict[_RegionKey, AbstractSDRAM]: """ The map from region identifiers to the amount of SDRAM required. @@ -66,16 +66,13 @@ def regions(self): return self.__regions def add_cost(self, region: _RegionKey, fixed_sdram: _Value, - per_timestep_sdram: _Value = 0): + per_timestep_sdram: _Value = 0) -> None: """ Adds the cost for the specified region. :param region: Key to identify the region - :type region: int or str or enum :param fixed_sdram: The fixed cost for this region. - :type fixed_sdram: int or numpy.integer :param per_timestep_sdram: The variable cost for this region is any - :type per_timestep_sdram: int or numpy.integer """ if per_timestep_sdram: self.nest(region, VariableSDRAM( @@ -83,7 +80,7 @@ def add_cost(self, region: _RegionKey, fixed_sdram: _Value, else: self.nest(region, ConstantSDRAM(_ceil(fixed_sdram))) - def nest(self, region: _RegionKey, other: AbstractSDRAM): + def nest(self, region: _RegionKey, other: AbstractSDRAM) -> None: """ Combines the other SDRAM cost, in a nested fashion. @@ -111,7 +108,7 @@ def nest(self, region: _RegionKey, other: AbstractSDRAM): else: self.__regions[region] = other - def merge(self, other: MultiRegionSDRAM): + def merge(self, other: MultiRegionSDRAM) -> None: """ Combines the other SDRAM costs keeping the region mappings. @@ -130,7 +127,7 @@ def merge(self, other: MultiRegionSDRAM): @overrides(AbstractSDRAM.report) def report(self, timesteps: Optional[int], indent: str = "", - preamble: str = "", target: Optional[TextIO] = None): + preamble: str = "", target: Optional[TextIO] = None) -> None: self._total.report(timesteps, indent, preamble, target) for region in self.__regions: self.__regions[region].report( diff --git a/pacman/model/resources/reverse_iptag_resource.py b/pacman/model/resources/reverse_iptag_resource.py index 0c4e2cba0..d0ab8e2ed 100644 --- a/pacman/model/resources/reverse_iptag_resource.py +++ b/pacman/model/resources/reverse_iptag_resource.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from typing import Optional +from typing import Any, Optional class ReverseIPtagResource(object): @@ -81,19 +81,19 @@ def get_value(self): """ return [self._port, self._sdp_port, self._tag] - def __repr__(self): + def __repr__(self) -> str: return (f"ReverseIPTagResource(port={self._port}, " f"sdp_port={self._sdp_port}, tag={self._tag})") - def __eq__(self, other): + def __eq__(self, other: Any) -> bool: if not isinstance(other, ReverseIPtagResource): return False return (self._port == other._port and self._sdp_port == other._sdp_port and self._tag == other._tag) - def __hash__(self): + def __hash__(self) -> int: return hash((self._port, self._sdp_port, self._tag)) - def __ne__(self, other): + def __ne__(self, other: Any) -> bool: return not self.__eq__(other) diff --git a/pacman/model/resources/shared_sdram.py b/pacman/model/resources/shared_sdram.py index 23966c5c7..11ef0fef0 100644 --- a/pacman/model/resources/shared_sdram.py +++ b/pacman/model/resources/shared_sdram.py @@ -115,7 +115,7 @@ def __add__(self, other: AbstractSDRAM) -> AbstractSDRAM: @overrides(AbstractSDRAM.report) def report(self, timesteps: Optional[int], indent: str = "", - preamble: str = "", target: Optional[TextIO] = None): + preamble: str = "", target: Optional[TextIO] = None) -> None: self._per_core.report(timesteps, indent, preamble, target) for key, sdram in self._shared.items(): sdram.report(timesteps, indent+" ", key+":", target) diff --git a/pacman/model/resources/variable_sdram.py b/pacman/model/resources/variable_sdram.py index ed874e3da..a4e676076 100644 --- a/pacman/model/resources/variable_sdram.py +++ b/pacman/model/resources/variable_sdram.py @@ -101,7 +101,7 @@ def __add__(self, other: AbstractSDRAM) -> AbstractSDRAM: @overrides(AbstractSDRAM.report) def report(self, timesteps: Optional[int], indent: str = "", - preamble: str = "", target: Optional[TextIO] = None): + preamble: str = "", target: Optional[TextIO] = None) -> None: print(indent, preamble, f"Fixed {self._fixed_sdram} bytes " f"Per_timestep {self._per_timestep_sdram} bytes " diff --git a/pacman/model/routing_info/routing_info.py b/pacman/model/routing_info/routing_info.py index 22b4179df..a81819061 100644 --- a/pacman/model/routing_info/routing_info.py +++ b/pacman/model/routing_info/routing_info.py @@ -34,7 +34,7 @@ def __init__(self) -> None: self._info: Dict[AbstractVertex, Dict[str, VertexRoutingInfo]] = defaultdict(dict) - def add_routing_info(self, info: VertexRoutingInfo): + def add_routing_info(self, info: VertexRoutingInfo) -> None: """ Add a routing information item. @@ -157,7 +157,7 @@ def has_info_from( def check_info_from( self, vertex: AbstractVertex, - allowed_partition_ids: Set[str]): + allowed_partition_ids: Set[str]) -> None: """ Check that the partition ids for a vertex are in the allowed set. diff --git a/pacman/model/tags/tags.py b/pacman/model/tags/tags.py index 577fdb3f8..012da646e 100644 --- a/pacman/model/tags/tags.py +++ b/pacman/model/tags/tags.py @@ -57,7 +57,7 @@ def __init__(self) -> None: # Set of ports already assigned on a board self._ports_assigned: Set[Tuple[str, int]] = set() - def add_ip_tag(self, ip_tag: IPTag, vertex: MachineVertex): + def add_ip_tag(self, ip_tag: IPTag, vertex: MachineVertex) -> None: """ Add an IP tag. @@ -102,7 +102,7 @@ def add_ip_tag(self, ip_tag: IPTag, vertex: MachineVertex): existing_tag.port = ip_tag.port def add_reverse_ip_tag( - self, reverse_ip_tag: ReverseIPTag, vertex: MachineVertex): + self, reverse_ip_tag: ReverseIPTag, vertex: MachineVertex) -> None: """ Add a reverse IP tag.