Update mypy to 1.20.0 (#4352)
* Update mypy to 1.20.0 This commit also removes a cast that is no longer needed after https://github.com/python/mypy/pull/20602 * Ignore os.system deprecation warnings from mypy to fix CI
This commit is contained in:
parent
29b73302ae
commit
d70e03fa3b
|
|
@ -31,7 +31,7 @@ repos:
|
|||
args: [--config=.flake8]
|
||||
fail_fast: true
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.19.1
|
||||
rev: v1.20.0
|
||||
hooks:
|
||||
- id: mypy
|
||||
args: [
|
||||
|
|
|
|||
|
|
@ -2009,7 +2009,7 @@ class Installer:
|
|||
# In accordance with https://github.com/archlinux/archinstall/issues/107#issuecomment-841701968
|
||||
# Setting an empty keymap first, allows the subsequent call to set layout for both console and x11.
|
||||
with Boot(self.target) as session:
|
||||
os.system('systemd-run --machine=archinstall --pty localectl set-keymap ""')
|
||||
os.system('systemd-run --machine=archinstall --pty localectl set-keymap ""') # type: ignore[deprecated, unused-ignore]
|
||||
|
||||
try:
|
||||
session.SysCommand(['localectl', 'set-keymap', language])
|
||||
|
|
@ -2075,7 +2075,7 @@ class Installer:
|
|||
|
||||
|
||||
def accessibility_tools_in_use() -> bool:
|
||||
return os.system('systemctl is-active --quiet espeakup.service') == 0
|
||||
return os.system('systemctl is-active --quiet espeakup.service') == 0 # type: ignore[deprecated, unused-ignore]
|
||||
|
||||
|
||||
def run_custom_user_commands(commands: list[str], installation: Installer) -> None:
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ class ListManager[ValueT]:
|
|||
raise ValueError('Unhandled return type')
|
||||
|
||||
if value in self._base_actions:
|
||||
value = cast(str, value)
|
||||
self._data = await self.handle_action(value, None, self._data)
|
||||
elif value in self._terminate_actions:
|
||||
break
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ def perform_installation(
|
|||
case PostInstallationAction.EXIT:
|
||||
pass
|
||||
case PostInstallationAction.REBOOT:
|
||||
_ = os.system('reboot')
|
||||
_ = os.system('reboot') # type: ignore[deprecated, unused-ignore]
|
||||
case PostInstallationAction.CHROOT:
|
||||
try:
|
||||
installation.drop_to_shell()
|
||||
|
|
|
|||
|
|
@ -1312,7 +1312,7 @@ class Tui:
|
|||
clear_screen: bool = False,
|
||||
) -> None:
|
||||
if clear_screen:
|
||||
os.system('clear')
|
||||
os.system('clear') # type: ignore[deprecated, unused-ignore]
|
||||
|
||||
if Tui._t is None:
|
||||
print(text, end=endl)
|
||||
|
|
@ -1357,7 +1357,7 @@ class Tui:
|
|||
return component.kickoff(self._screen)
|
||||
|
||||
def _reset_terminal(self) -> None:
|
||||
os.system('reset')
|
||||
os.system('reset') # type: ignore[deprecated, unused-ignore]
|
||||
|
||||
def _set_up_colors(self) -> None:
|
||||
curses.init_pair(STYLE.NORMAL.value, curses.COLOR_WHITE, curses.COLOR_BLACK)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ Source = "https://github.com/archlinux/archinstall"
|
|||
[project.optional-dependencies]
|
||||
log = ["systemd_python==235"]
|
||||
dev = [
|
||||
"mypy==1.19.1",
|
||||
"mypy==1.20.0",
|
||||
"flake8==7.3.0",
|
||||
"pre-commit==4.5.1",
|
||||
"ruff==0.15.8",
|
||||
|
|
|
|||
Loading…
Reference in New Issue