From 95b442cf028e90a9b9e2fc46ebf8ae0e88ee4b26 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 22 Dec 2022 14:04:34 +0000 Subject: [PATCH] stats.py: Minor typing fixes. --- stats.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stats.py b/stats.py index 6886eb23..f7f15b86 100644 --- a/stats.py +++ b/stats.py @@ -442,7 +442,9 @@ class StatsResults(tk.Toplevel): ): self.geometry(f"+{position.left}+{position.top}") - def addpage(self, parent, header: List[str] = None, align: Optional[str] = None) -> tk.Frame: + def addpage( + self, parent, header: List[str] | None = None, align: str | None = None + ) -> ttk.Frame: """ Add a page to the StatsResults screen. @@ -462,7 +464,7 @@ class StatsResults(tk.Toplevel): return page - def addpageheader(self, parent: tk.Frame, header: Sequence[str], align: Optional[str] = None) -> None: + def addpageheader(self, parent: ttk.Frame, header: Sequence[str], align: Optional[str] = None) -> None: """ Add the column headers to the page, followed by a separator. @@ -478,7 +480,7 @@ class StatsResults(tk.Toplevel): self.addpagerow(parent, ['']) def addpagerow( - self, parent: tk.Frame, content: Sequence[str], align: Optional[str] = None, with_copy: bool = False + self, parent: ttk.Frame, content: Sequence[str], align: Optional[str] = None, with_copy: bool = False ): """ Add a single row to parent.