소스 검색

add type hints to FlowBarGraphWithVScale.set_data

Daniel Sheffield 1 년 전
부모
커밋
b14af1165c
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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