Skip to content

Commit ae38e92

Browse files
authored
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 "<partial list[?]>" cannot be checked with "issubtype()"
1 parent 1e2f970 commit ae38e92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

archinstall/tui/curses_menu.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,10 @@ def __init__(
718718
self._interrupt_warning = reset_warning_msg
719719
self._header = header
720720

721-
self._header_entries = []
721+
# TODO: Remove the inline annotation after upgrading to mypy 1.16.0
722+
# The inline annotation is needed to avoid a crash in 1.15.0:
723+
# RuntimeError: Partial type "<partial list[?]>" cannot be checked with "issubtype()"
724+
self._header_entries: list[ViewportEntry] = []
722725
if header:
723726
self._header_entries = self.get_header_entries(header)
724727

0 commit comments

Comments
 (0)