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
|
||||
from archinstall.default_profiles.profile import Profile, ProfileType
|
||||
|
|
@ -6,7 +6,6 @@ from archinstall.default_profiles.profile import Profile, ProfileType
|
|||
if TYPE_CHECKING:
|
||||
from archinstall.lib.installer import Installer
|
||||
from archinstall.lib.models import User
|
||||
_: Any
|
||||
|
||||
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from archinstall.lib.installer import Installer
|
||||
_: Any
|
||||
|
||||
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class BspwmProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class BudgieProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class CinnamonProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class CosmicProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from archinstall.lib.installer import Installer
|
||||
_: Any
|
||||
|
||||
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class DeepinProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class EnlighenmentProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class GnomeProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class I3wmProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class LxqtProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class MateProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class PlasmaProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class QtileProfile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class Xfce4Profile(XorgProfile):
|
||||
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.xorg import XorgProfile
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from archinstall.lib.installer import Installer
|
||||
_: Any
|
||||
|
||||
|
||||
class TailoredProfile(XorgProfile):
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import time
|
|||
import uuid
|
||||
from collections.abc import Iterable
|
||||
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
|
||||
|
||||
|
|
@ -43,9 +43,6 @@ from .device_model import (
|
|||
get_lsblk_info,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
class DeviceHandler:
|
||||
_TMP_BTRFS_MOUNT = Path('/mnt/arch_btrfs')
|
||||
|
|
|
|||
|
|
@ -1,14 +1,11 @@
|
|||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
from typing import TYPE_CHECKING, Any
|
||||
from typing import Any
|
||||
|
||||
from ...default_profiles.applications.pipewire import PipewireProfile
|
||||
from ..hardware import SysInfo
|
||||
from ..output import info
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
@dataclass
|
||||
class Audio(Enum):
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import TYPE_CHECKING, Any
|
||||
from typing import Any
|
||||
|
||||
from archinstall.default_profiles.profile import GreeterType, Profile
|
||||
|
||||
from ..hardware import GfxDriver
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
@dataclass
|
||||
class ProfileConfiguration:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
import archinstall
|
||||
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.tui import Tui
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
if archinstall.arguments.get('help'):
|
||||
print("See `man archinstall` for help.")
|
||||
exit(0)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
import archinstall
|
||||
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.tui import Tui
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
||||
|
||||
info("Minimal only supports:")
|
||||
info(" * Being installed to a single disk")
|
||||
|
||||
|
|
|
|||
|
|
@ -85,10 +85,17 @@ warn_unreachable = true
|
|||
warn_unused_configs = 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]]
|
||||
module = "archinstall.examples.*"
|
||||
disallow_any_explicit = true
|
||||
follow_imports = "silent"
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "archinstall.lib.*"
|
||||
|
|
|
|||
Loading…
Reference in New Issue