more on type hinting, remove unecessary function comments
This commit is contained in:
parent
7bbd6aa353
commit
eb5f2c5648
34 changed files with 169 additions and 326 deletions
|
@ -53,31 +53,31 @@ class NodeUtils:
|
|||
ANTENNA_ICON = None
|
||||
|
||||
@classmethod
|
||||
def is_ignore_node(cls, node_type):
|
||||
def is_ignore_node(cls, node_type) -> bool:
|
||||
return node_type in cls.IGNORE_NODES
|
||||
|
||||
@classmethod
|
||||
def is_container_node(cls, node_type):
|
||||
def is_container_node(cls, node_type) -> bool:
|
||||
return node_type in cls.CONTAINER_NODES
|
||||
|
||||
@classmethod
|
||||
def is_model_node(cls, node_type):
|
||||
def is_model_node(cls, node_type) -> bool:
|
||||
return node_type == NodeType.DEFAULT
|
||||
|
||||
@classmethod
|
||||
def is_image_node(cls, node_type):
|
||||
def is_image_node(cls, node_type) -> bool:
|
||||
return node_type in cls.IMAGE_NODES
|
||||
|
||||
@classmethod
|
||||
def is_wireless_node(cls, node_type):
|
||||
def is_wireless_node(cls, node_type) -> bool:
|
||||
return node_type in cls.WIRELESS_NODES
|
||||
|
||||
@classmethod
|
||||
def is_rj45_node(cls, node_type):
|
||||
def is_rj45_node(cls, node_type) -> bool:
|
||||
return node_type in cls.RJ45_NODES
|
||||
|
||||
@classmethod
|
||||
def node_icon(cls, node_type, model):
|
||||
def node_icon(cls, node_type, model: str) -> bool:
|
||||
if model == "":
|
||||
model = None
|
||||
return cls.NODE_ICONS[(node_type, model)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue