From ae38e921006342d277fc76cf5a129733cd27b0ac Mon Sep 17 00:00:00 2001 From: correctmost <134317971+correctmost@users.noreply.github.com> Date: Sun, 4 May 2025 17:04:18 -0400 Subject: [PATCH] Add an inline annotation to avoid a crash with mypy 1.15.0 (#3434) The annotation prevents intermittent crashes when running mypy with a clean cache: ./archinstall/tui/curses_menu.py:723: error: INTERNAL ERROR RuntimeError: Partial type "" cannot be checked with "issubtype()" --- archinstall/tui/curses_menu.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/archinstall/tui/curses_menu.py b/archinstall/tui/curses_menu.py index 7cc63507..c11e753f 100644 --- a/archinstall/tui/curses_menu.py +++ b/archinstall/tui/curses_menu.py @@ -718,7 +718,10 @@ class SelectMenu[ValueT](AbstractCurses[ValueT]): self._interrupt_warning = reset_warning_msg self._header = header - self._header_entries = [] + # TODO: Remove the inline annotation after upgrading to mypy 1.16.0 + # The inline annotation is needed to avoid a crash in 1.15.0: + # RuntimeError: Partial type "" cannot be checked with "issubtype()" + self._header_entries: list[ViewportEntry] = [] if header: self._header_entries = self.get_header_entries(header)