Remove unused Any instances from TYPE_CHECKING blocks (#2878)
This will make it easier to start removing more Any instances from the codebase.
This commit is contained in:
parent
3255744278
commit
f3f7700945
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import archinstall
|
import archinstall
|
||||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
|
|
@ -6,7 +6,6 @@ from archinstall.default_profiles.profile import Profile, ProfileType
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from archinstall.lib.installer import Installer
|
from archinstall.lib.installer import Installer
|
||||||
from archinstall.lib.models import User
|
from archinstall.lib.models import User
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class PipewireProfile(Profile):
|
class PipewireProfile(Profile):
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import ProfileType
|
from archinstall.default_profiles.profile import ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from archinstall.lib.installer import Installer
|
from archinstall.lib.installer import Installer
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class AwesomeProfile(XorgProfile):
|
class AwesomeProfile(XorgProfile):
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class BspwmProfile(XorgProfile):
|
class BspwmProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class BudgieProfile(XorgProfile):
|
class BudgieProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class CinnamonProfile(XorgProfile):
|
class CinnamonProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class CosmicProfile(XorgProfile):
|
class CosmicProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from archinstall.lib.installer import Installer
|
from archinstall.lib.installer import Installer
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class CutefishProfile(XorgProfile):
|
class CutefishProfile(XorgProfile):
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class DeepinProfile(XorgProfile):
|
class DeepinProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class EnlighenmentProfile(XorgProfile):
|
class EnlighenmentProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class GnomeProfile(XorgProfile):
|
class GnomeProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class I3wmProfile(XorgProfile):
|
class I3wmProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class LxqtProfile(XorgProfile):
|
class LxqtProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class MateProfile(XorgProfile):
|
class MateProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class PlasmaProfile(XorgProfile):
|
class PlasmaProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class QtileProfile(XorgProfile):
|
class QtileProfile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,6 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
from archinstall.default_profiles.profile import GreeterType, ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class Xfce4Profile(XorgProfile):
|
class Xfce4Profile(XorgProfile):
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import ProfileType
|
from archinstall.default_profiles.profile import ProfileType
|
||||||
from archinstall.default_profiles.xorg import XorgProfile
|
from archinstall.default_profiles.xorg import XorgProfile
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from archinstall.lib.installer import Installer
|
from archinstall.lib.installer import Installer
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class TailoredProfile(XorgProfile):
|
class TailoredProfile(XorgProfile):
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import time
|
||||||
import uuid
|
import uuid
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Any, Literal
|
from typing import Any, Literal
|
||||||
|
|
||||||
from parted import Device, Disk, DiskException, FileSystem, Geometry, IOException, Partition, PartitionException, freshDisk, getAllDevices, getDevice, newDisk
|
from parted import Device, Disk, DiskException, FileSystem, Geometry, IOException, Partition, PartitionException, freshDisk, getAllDevices, getDevice, newDisk
|
||||||
|
|
||||||
|
|
@ -43,9 +43,6 @@ from .device_model import (
|
||||||
get_lsblk_info,
|
get_lsblk_info,
|
||||||
)
|
)
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
class DeviceHandler:
|
class DeviceHandler:
|
||||||
_TMP_BTRFS_MOUNT = Path('/mnt/arch_btrfs')
|
_TMP_BTRFS_MOUNT = Path('/mnt/arch_btrfs')
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,11 @@
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import Any
|
||||||
|
|
||||||
from ...default_profiles.applications.pipewire import PipewireProfile
|
from ...default_profiles.applications.pipewire import PipewireProfile
|
||||||
from ..hardware import SysInfo
|
from ..hardware import SysInfo
|
||||||
from ..output import info
|
from ..output import info
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class Audio(Enum):
|
class Audio(Enum):
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import Any
|
||||||
|
|
||||||
from archinstall.default_profiles.profile import GreeterType, Profile
|
from archinstall.default_profiles.profile import GreeterType, Profile
|
||||||
|
|
||||||
from ..hardware import GfxDriver
|
from ..hardware import GfxDriver
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class ProfileConfiguration:
|
class ProfileConfiguration:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
import archinstall
|
import archinstall
|
||||||
from archinstall import SysInfo, debug, info
|
from archinstall import SysInfo, debug, info
|
||||||
|
|
@ -13,10 +12,6 @@ from archinstall.lib.models.network_configuration import NetworkConfiguration
|
||||||
from archinstall.lib.profile.profiles_handler import profile_handler
|
from archinstall.lib.profile.profiles_handler import profile_handler
|
||||||
from archinstall.tui import Tui
|
from archinstall.tui import Tui
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
if archinstall.arguments.get('help'):
|
if archinstall.arguments.get('help'):
|
||||||
print("See `man archinstall` for help.")
|
print("See `man archinstall` for help.")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import TYPE_CHECKING, Any
|
|
||||||
|
|
||||||
import archinstall
|
import archinstall
|
||||||
from archinstall import ConfigurationOutput, Installer, debug, info
|
from archinstall import ConfigurationOutput, Installer, debug, info
|
||||||
|
|
@ -10,10 +9,6 @@ from archinstall.lib.models import Bootloader, User
|
||||||
from archinstall.lib.profile import ProfileConfiguration, profile_handler
|
from archinstall.lib.profile import ProfileConfiguration, profile_handler
|
||||||
from archinstall.tui import Tui
|
from archinstall.tui import Tui
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
_: Any
|
|
||||||
|
|
||||||
|
|
||||||
info("Minimal only supports:")
|
info("Minimal only supports:")
|
||||||
info(" * Being installed to a single disk")
|
info(" * Being installed to a single disk")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,10 +85,17 @@ warn_unreachable = true
|
||||||
warn_unused_configs = true
|
warn_unused_configs = true
|
||||||
warn_unused_ignores = true
|
warn_unused_ignores = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "archinstall.default_profiles.applications.*"
|
||||||
|
disallow_any_explicit = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "archinstall.default_profiles.servers.*"
|
||||||
|
disallow_any_explicit = true
|
||||||
|
|
||||||
[[tool.mypy.overrides]]
|
[[tool.mypy.overrides]]
|
||||||
module = "archinstall.examples.*"
|
module = "archinstall.examples.*"
|
||||||
disallow_any_explicit = true
|
disallow_any_explicit = true
|
||||||
follow_imports = "silent"
|
|
||||||
|
|
||||||
[[tool.mypy.overrides]]
|
[[tool.mypy.overrides]]
|
||||||
module = "archinstall.lib.*"
|
module = "archinstall.lib.*"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue