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()"
This commit is contained in:
parent
1e2f9704c8
commit
ae38e92100
|
|
@ -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 "<partial list[?]>" cannot be checked with "issubtype()"
|
||||
self._header_entries: list[ViewportEntry] = []
|
||||
if header:
|
||||
self._header_entries = self.get_header_entries(header)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue