mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
mypy: Fix future syntax errors and other minor mistakes.
When we move to the Python 3 mypy syntax, we can't reference a class before its definition.
This commit is contained in:
@@ -20,7 +20,7 @@ class Graph(object):
|
||||
self.nodes.add(child)
|
||||
|
||||
def copy(self):
|
||||
# type: () -> Graph
|
||||
# type: () -> 'Graph'
|
||||
return Graph(self.edges())
|
||||
|
||||
def num_edges(self):
|
||||
@@ -28,7 +28,7 @@ class Graph(object):
|
||||
return len(self.edges())
|
||||
|
||||
def minus_edge(self, edge):
|
||||
# type: (Edge) -> Graph
|
||||
# type: (Edge) -> 'Graph'
|
||||
edges = self.edges().copy()
|
||||
edges.remove(edge)
|
||||
return Graph(edges)
|
||||
|
||||
Reference in New Issue
Block a user