Skip to content

Commit 4afd30d

Browse files
committed
fix style
1 parent c4a2028 commit 4afd30d

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def view_edge_list(self):
468468
use_initial_input_df = False
469469

470470
if use_initial_input_df and self.properties.directed:
471-
edgelist_df = self.input_df # Original input.
471+
edgelist_df = self.input_df # Original input.
472472
else:
473473
edgelist_df = self.decompress_to_edgelist()
474474
if srcCol is None and dstCol is None:
@@ -527,7 +527,6 @@ def view_edge_list(self):
527527

528528
return edgelist_df
529529

530-
531530
def delete_edge_list(self):
532531
"""
533532
Delete the edge list.

python/cugraph/cugraph/tests/structure/test_graph.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ def test_view_edge_list_for_nxGraph(directed):
459459
G = nx.florentine_families_graph()
460460
df = nx.to_pandas_edgelist(G)
461461
cG = cugraph.Graph(directed=directed)
462-
cG.from_pandas_edgelist(df, source='source', destination='target')
462+
cG.from_pandas_edgelist(df, source="source", destination="target")
463463

464464
assert df.shape == cG.view_edge_list().shape
465465

@@ -621,26 +621,25 @@ def test_number_of_vertices(graph_file):
621621
def test_number_of_edges():
622622

623623
# cycle edges
624-
cycle_edges = [
625-
(0, 1, 1.0),
626-
(1, 2, 1.0),
627-
(2, 3, 1.0),
628-
(3, 0, 1.0)
629-
]
624+
cycle_edges = [(0, 1, 1.0), (1, 2, 1.0), (2, 3, 1.0), (3, 0, 1.0)]
630625

631626
# Create pandas DataFrame
632-
df = pd.DataFrame(cycle_edges, columns=['source', 'destination', 'weight'])
633-
627+
df = pd.DataFrame(cycle_edges, columns=["source", "destination", "weight"])
628+
634629
# Convert to cuDF
635630
cudf_edges = cudf.DataFrame.from_pandas(df)
636-
631+
637632
# Create directed graph
638633
G_directed = cugraph.Graph(directed=True)
639-
G_directed.from_cudf_edgelist(cudf_edges, source='source', destination='destination', edge_attr='weight')
640-
634+
G_directed.from_cudf_edgelist(
635+
cudf_edges, source="source", destination="destination", edge_attr="weight"
636+
)
637+
641638
# Create undirected graph
642639
G_undirected = cugraph.Graph(directed=False)
643-
G_undirected.from_cudf_edgelist(cudf_edges, source='source', destination='destination', edge_attr='weight')
640+
G_undirected.from_cudf_edgelist(
641+
cudf_edges, source="source", destination="destination", edge_attr="weight"
642+
)
644643

645644
assert G_directed.number_of_edges() == G_undirected.number_of_edges()
646645

0 commit comments

Comments
 (0)