mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Chore: [ALAS] Expose one Platform class
This commit is contained in:
parent
0a11493095
commit
cef99b81c5
@ -1,10 +1,10 @@
|
||||
import collections
|
||||
import itertools
|
||||
import sys
|
||||
|
||||
from module.base.timer import Timer
|
||||
from module.device.app_control import AppControl
|
||||
from module.device.control import Control
|
||||
from module.device.platform import Platform
|
||||
from module.device.screenshot import Screenshot
|
||||
from module.exception import (
|
||||
EmulatorNotRunningError,
|
||||
@ -15,11 +15,6 @@ from module.exception import (
|
||||
)
|
||||
from module.logger import logger
|
||||
|
||||
if sys.platform == 'win32':
|
||||
from module.device.platform.platform_windows import PlatformWindows as Platform
|
||||
else:
|
||||
from module.device.platform.platform_base import PlatformBase as Platform
|
||||
|
||||
|
||||
def show_function_call():
|
||||
"""
|
||||
|
6
module/device/platform/__init__.py
Normal file
6
module/device/platform/__init__.py
Normal file
@ -0,0 +1,6 @@
|
||||
import sys
|
||||
|
||||
if sys.platform == 'win32':
|
||||
from module.device.platform.platform_windows import PlatformWindows as Platform
|
||||
else:
|
||||
from module.device.platform.platform_base import PlatformBase as Platform
|
@ -54,7 +54,7 @@ class EmulatorInstanceBase:
|
||||
Returns:
|
||||
str: Emulator type, such as Emulator.NoxPlayer
|
||||
"""
|
||||
return EmulatorBase.path_to_type(self.path)
|
||||
return self.emulator.type
|
||||
|
||||
@cached_property
|
||||
def emulator(self):
|
||||
|
@ -56,14 +56,6 @@ def abspath(path):
|
||||
|
||||
|
||||
class EmulatorInstance(EmulatorInstanceBase):
|
||||
@cached_property
|
||||
def type(self) -> str:
|
||||
"""
|
||||
Returns:
|
||||
str: Emulator type, such as Emulator.NoxPlayer
|
||||
"""
|
||||
return Emulator.path_to_type(self.path)
|
||||
|
||||
@cached_property
|
||||
def emulator(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user