Skip to content

Commit 2b89f19

Browse files
committed
fix style check
1 parent e78dd08 commit 2b89f19

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

python/cugraph/cugraph/structure/graph_classes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ def __init__(self, m_graph=None, directed=False):
7272
# with different weight column names than the one provided
7373
# by the user.
7474
weights = m_graph.weight_column
75-
elist = elist.rename(
76-
columns={'weight': weights}
77-
).reset_index(drop=True)
75+
elist = elist.rename(columns={"weight": weights}).reset_index(
76+
drop=True
77+
)
7878
else:
7979
weights = None
8080
self.from_cudf_edgelist(

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,8 +947,7 @@ def number_of_edges(self, directed_edges=False):
947947
"""
948948
# TODO: Move to Outer graphs?
949949
if directed_edges and self.edgelist is not None:
950-
return len(self.decompress_to_edgelist(
951-
return_unrenumbered_edgelist=False))
950+
return len(self.decompress_to_edgelist(return_unrenumbered_edgelist=False))
952951
if self.properties.edge_count is None:
953952
if self.edgelist is not None:
954953
edgelist_df = self.decompress_to_edgelist()

python/cugraph/cugraph/tests/structure/test_convert_matrix.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,8 @@ def test_to_from_pandas(graph_file):
6767
# Compare pandas edgelist
6868
exp_pdf = nx.to_pandas_edgelist(new_nxG)
6969
res_pdf = cugraph.to_pandas_edgelist(new_cuG)
70-
71-
exp_pdf = exp_pdf.rename(
72-
columns={"source": "src", "target": "dst"}
73-
)
70+
71+
exp_pdf = exp_pdf.rename(columns={"source": "src", "target": "dst"})
7472

7573
exp_pdf = exp_pdf.sort_values(by=["src", "dst"]).reset_index(drop=True)
7674
res_pdf = res_pdf.sort_values(by=["src", "dst"]).reset_index(drop=True)
@@ -118,9 +116,7 @@ def test_from_to_numpy(graph_file):
118116
exp_pdf = nx.to_pandas_edgelist(new_nxG)
119117
res_pdf = cugraph.to_pandas_edgelist(new_cuG)
120118

121-
exp_pdf = exp_pdf.rename(
122-
columns={"source": "src", "target": "dst"}
123-
)
119+
exp_pdf = exp_pdf.rename(columns={"source": "src", "target": "dst"})
124120

125121
exp_pdf = exp_pdf.sort_values(by=["src", "dst"]).reset_index(drop=True)
126122
res_pdf = res_pdf.sort_values(by=["src", "dst"]).reset_index(drop=True)
@@ -138,9 +134,7 @@ def test_from_to_numpy(graph_file):
138134
exp_pdf = nx.to_pandas_edgelist(new_nxG)
139135
res_pdf = cugraph.to_pandas_edgelist(new_cuG)
140136

141-
exp_pdf = exp_pdf.rename(
142-
columns={"source": "src", "target": "dst"}
143-
)
137+
exp_pdf = exp_pdf.rename(columns={"source": "src", "target": "dst"})
144138

145139
exp_pdf = exp_pdf.sort_values(by=["src", "dst"]).reset_index(drop=True)
146140
res_pdf = res_pdf.sort_values(by=["src", "dst"]).reset_index(drop=True)

0 commit comments

Comments
 (0)