Skip to content
Snippets Groups Projects
Commit 8dc07555 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Eliminated var assignments inside assertion statement

parent a4e2ccb7
No related branches found
No related tags found
No related merge requests found
Pipeline #118570 failed
......@@ -43,7 +43,8 @@ class Executable:
def get_version(self) -> dict[str, Any]:
assert self.executable_name == "hived", "version can only be checked for hived binary!"
assert isinstance(result := json.loads(self.__run_and_get_output("--version")), dict)
result = json.loads(self.__run_and_get_output("--version"))
assert isinstance(result, dict)
return result
def __run_and_get_output(self, *arguments: str) -> str:
......
......@@ -115,7 +115,8 @@ class Node(BaseNode, ScopedObject):
@property
def http_endpoint(self) -> HttpUrl:
assert (endpoint := self.__notifications.handler.http_endpoint) is not None
endpoint = self.__notifications.handler.http_endpoint
assert endpoint is not None
return endpoint
@http_endpoint.setter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment