Skip to content

Commit 691ff5a

Browse files
Fixed trailing whitespace issues
1 parent 6700871 commit 691ff5a

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

pydatastructs/graphs/graph.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,15 @@ def __new__(cls, *args, **kwargs):
8282
from pydatastructs.graphs.adjacency_list import AdjacencyList
8383
obj = AdjacencyList(*args)
8484
obj._impl = implementation
85-
8685
elif implementation == 'adjacency_matrix':
8786
from pydatastructs.graphs.adjacency_matrix import AdjacencyMatrix
8887
obj = AdjacencyMatrix(*args)
8988
obj._impl = implementation
90-
9189
else:
9290
raise NotImplementedError("%s implementation is not a part "
9391
"of the library currently."%(implementation))
9492
obj._impl = implementation
95-
obj.snapshots = {}
96-
93+
obj.snapshots = {}
9794
def add_snapshot(self):
9895
"""Automatically assigns timestamps using system time."""
9996
timestamp = int(time.time())
@@ -112,19 +109,14 @@ def get_snapshot(self, timestamp: int):
112109
if timestamp not in self.snapshots:
113110
raise ValueError(f"Snapshot for timestamp {timestamp} does not exist. "
114111
f"Available timestamps: {sorted(self.snapshots.keys())}")
115-
116112
return self.snapshots[timestamp]
117113
def list_snapshots(self):
118114
"""Returns all stored timestamps in sorted order."""
119115
return sorted(self.snapshots.keys())
120-
121-
122116
obj.add_snapshot = add_snapshot.__get__(obj)
123117
obj.get_snapshot = get_snapshot.__get__(obj)
124118
obj.list_snapshots = list_snapshots.__get__(obj)
125119
return obj
126-
127-
128120
def is_adjacent(self, node1, node2):
129121
"""
130122
Checks if the nodes with the given

0 commit comments

Comments
 (0)