Skip to content

Commit

Permalink
tag board_address and port are never None
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Nov 13, 2024
1 parent c70d561 commit f97d635
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pacman/model/resources/iptag_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class IPtagResource(object):
"_traffic_identifier")

def __init__(
self, ip_address: Optional[str], port: Optional[int],
self, ip_address: str, port: int,
strip_sdp: bool, tag: Optional[int] = None,
traffic_identifier: str = "DEFAULT"):
"""
Expand All @@ -60,7 +60,7 @@ def __init__(
self._traffic_identifier = traffic_identifier

@property
def ip_address(self) -> Optional[str]:
def ip_address(self) -> str:
"""
The IP address to assign to the tag.
Expand All @@ -69,7 +69,7 @@ def ip_address(self) -> Optional[str]:
return self._ip_address

@property
def port(self) -> Optional[int]:
def port(self) -> int:
"""
The port of the tag.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,9 @@ def __create_tag(
tag: int) -> IPTag:
ethernet_ip = eth_chip.ip_address
assert ethernet_ip is not None
tag_ip = iptag.ip_address
assert tag_ip is not None
return IPTag(
ethernet_ip, placement.x, placement.y,
tag, tag_ip, iptag.port,
tag, iptag.ip_address, iptag.port,
iptag.strip_sdp, iptag.traffic_identifier)


Expand Down

0 comments on commit f97d635

Please sign in to comment.