mirror of https://github.com/zulip/zulip.git
mypy: Wrap return value in Optional.
This commit is contained in:
parent
cc1937c8d5
commit
7636972a6c
|
@ -3,7 +3,7 @@ from __future__ import print_function
|
|||
|
||||
from collections import defaultdict
|
||||
|
||||
from typing import Callable, DefaultDict, Iterator, List, Set, Tuple
|
||||
from typing import Callable, DefaultDict, Iterator, List, Optional, Set, Tuple
|
||||
|
||||
Edge = Tuple[str, str]
|
||||
EdgeSet = Set[Edge]
|
||||
|
@ -87,7 +87,7 @@ class Graph(object):
|
|||
print(tup)
|
||||
|
||||
def best_edge_to_remove(orig_graph, is_exempt):
|
||||
# type: (Graph, Callable[[Edge], bool]) -> Edge
|
||||
# type: (Graph, Callable[[Edge], bool]) -> Optional[Edge]
|
||||
# expects an already reduced graph as input
|
||||
|
||||
orig_edges = orig_graph.edges()
|
||||
|
|
|
@ -223,7 +223,7 @@ class BaseWebsocketHandler(WebSocketHandler):
|
|||
self.client = None # type: Any
|
||||
|
||||
def get(self, *args, **kwargs):
|
||||
# type: (*Any, **Any) -> Callable
|
||||
# type: (*Any, **Any) -> Optional[Callable]
|
||||
# use get method from WebsocketHandler
|
||||
return super(BaseWebsocketHandler, self).get(*args, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue