From 50bb9d076ec652d356790c55b3005cad3f1fc18e Mon Sep 17 00:00:00 2001 From: Caleb Ho Date: Thu, 19 Dec 2019 16:41:19 -0800 Subject: [PATCH] Typecheck untyped functions Helps catch errors in functions which do not have a full type signature specification. --- mypy.ini | 1 + ultratrace2/gui/widgets/div.py | 4 ++-- ultratrace2/gui/widgets/zoom_frame.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mypy.ini b/mypy.ini index 75f19c2..2ea754c 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,4 +1,5 @@ [mypy] +check_untyped_defs=True [mypy-pytest,pytest.*] ignore_missing_imports=True diff --git a/ultratrace2/gui/widgets/div.py b/ultratrace2/gui/widgets/div.py index 8b1b1ab..a07ebbf 100644 --- a/ultratrace2/gui/widgets/div.py +++ b/ultratrace2/gui/widgets/div.py @@ -8,5 +8,5 @@ def __init__(self, parent, children=[], sticky=""): def grid(self, *args, **kwargs): super().grid(*args, **kwargs) - def grid_remove(self, *args, **kwargs): - super().grid_remove(*args, **kwargs) + def grid_remove(self): + super().grid_remove() diff --git a/ultratrace2/gui/widgets/zoom_frame.py b/ultratrace2/gui/widgets/zoom_frame.py index 435ecea..08bcdfe 100644 --- a/ultratrace2/gui/widgets/zoom_frame.py +++ b/ultratrace2/gui/widgets/zoom_frame.py @@ -142,5 +142,5 @@ def grid(self, **kwargs): self.canvas.grid(sticky="news", column=0, row=0, rowspan=2) def grid_remove(self): - super().grid_remove(self) + super().grid_remove() self.canvas.grid_remove()