1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

Review fixes and ruff settings

This commit is contained in:
Alexander Presnyakov
2025-04-18 03:59:40 +00:00
parent 7255340ae5
commit 04015ae414
5 changed files with 30 additions and 19 deletions

View File

@@ -398,7 +398,7 @@ def _remove_node(root, node):
for n in (root.find("./DesiredNodes"), root.find("./InactiveNodes"), root.find("./ActiveNodes")):
__remove_helper(n, node)
read_only_nodes = root.find("./ReadOnlyNodes")
read_only_nodes = root.find('./ReadOnlyNodes')
if read_only_nodes is not None:
__remove_helper(read_only_nodes, node)
@@ -1015,11 +1015,11 @@ def _add_WES(root, pm_num, node):
etree.SubElement(wes_node, "Port").text = "8630"
def _add_read_only_node(root, node) -> None:
"""Add node name to ReadOnlyNodes if it's not already there"""
read_only_nodes = root.find("./ReadOnlyNodes")
def _add_read_only_node(root: etree.Element, node: str) -> None:
'''Add node name to ReadOnlyNodes if it is not already there'''
read_only_nodes = root.find('./ReadOnlyNodes')
if read_only_nodes is None:
read_only_nodes = etree.SubElement(root, "ReadOnlyNodes")
read_only_nodes = etree.SubElement(root, 'ReadOnlyNodes')
else:
for n in read_only_nodes.findall("./Node"):
if n.text == node: