Przeglądaj źródła

add type hints to FlowBarGraphWithVScale.set_data

Daniel Sheffield 1 rok temu
rodzic
commit
b14af1165c
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      app/widgets.py

+ 5 - 1
app/widgets.py

@@ -350,7 +350,11 @@ class FlowBarGraphWithVScale(Columns):
     def set_caption(self, text):
         self.graph_caption.set_text(text)
 
-    def set_data(self, data, _max, vscale=None, caption=None):
+    def set_data(
+            self, data: Iterable[Iterable], _max: float,
+            vscale: Iterable[float] = None,
+            caption: str = None
+        ):
         labels = vscale or []
         caption = caption or u''
         top = self.height