From 49cf03fc212c813862453de5352436dc90d1e458 Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Thu, 15 Dec 2022 16:50:53 +0100 Subject: imports and init files --- bsie/utils/node.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'bsie/utils/node.py') diff --git a/bsie/utils/node.py b/bsie/utils/node.py index c9c494f..ecf39cd 100644 --- a/bsie/utils/node.py +++ b/bsie/utils/node.py @@ -8,7 +8,7 @@ Author: Matthias Baumgartner, 2022 import typing # bsie imports -from bsie.utils.bsfs import URI, typename +from bsie.utils import bsfs # exports __all__: typing.Sequence[str] = ( @@ -22,19 +22,19 @@ class Node(): """Lightweight Node, disconnected from any bsfs structures.""" # node type. - node_type: URI + node_type: bsfs.URI # node URI. - uri: URI + uri: bsfs.URI def __init__( self, - node_type: URI, - uri: URI, + node_type: bsfs.URI, + uri: bsfs.URI, ): # assign members - self.node_type = URI(node_type) - self.uri = URI(uri) + self.node_type = bsfs.URI(node_type) + self.uri = bsfs.URI(uri) def __eq__(self, other: typing.Any) -> bool: return isinstance(other, Node) \ @@ -45,9 +45,9 @@ class Node(): return hash((type(self), self.node_type, self.uri)) def __str__(self) -> str: - return f'{typename(self)}({self.node_type}, {self.uri})' + return f'{bsfs.typename(self)}({self.node_type}, {self.uri})' def __repr__(self) -> str: - return f'{typename(self)}({self.node_type}, {self.uri})' + return f'{bsfs.typename(self)}({self.node_type}, {self.uri})' ## EOF ## -- cgit v1.2.3