Showing 10 of 107 total issues
Consider simplifying this complex logical expression. Open
Open
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Format and clean Jupyter notebooks by removing TensorFlow warnings "
"and stderr outputs, formatting and numbering the code cells, and setting the kernel. "
Avoid deeply nested control flow statements. Open
Open
if dv == d:
u_v_edge_type = (nodes_dict[u[0]], nodes_dict[v])
# if no edge between u and next_node[0] then this is the sample, so record and stop
# searching
# Note: The if statement below is very expensive to evaluate because it need to checks
Avoid deeply nested control flow statements. Open
Open
if original != updated:
check_failed.append(str(file_loc))
if on_ci:
# CI doesn't provide enough state to diagnose a peculiar or
Avoid deeply nested control flow statements. Open
Open
with open(file_loc) as f:
original = f.read()
Avoid deeply nested control flow statements. Open
Open
if dv == d:
# if no edge between u and next_node[0] then this is the sample, so record and stop
# searching
if (
(u != v)
Avoid deeply nested control flow statements. Open
Open
for et in current_edge_types:
neigh_et = adj[et][current_node]
# If there are no neighbours of this type then we return None
# in the place of the nodes that would have been sampled
Avoid deeply nested control flow statements. Open
Open
with builder.element("td"):
self._render_cell(builder, algorithm.columns[heading])
Avoid deeply nested control flow statements. Open
Open
if len(neighbours) == 0:
# if no neighbours of the required type as dictated by the metapath exist, then stop.
break
# select one of the neighbours uniformly at random
current_node = rs.choice(
Avoid deeply nested control flow statements. Open
Open
with open(f"{nb_file_loc}.ipynb") as f:
updated = f.read()
Avoid too many return
statements within this function. Open
Open
return T(inp)