mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-10-12 13:12:06 +00:00
refactor: streamline platform imports and remove redundant type method
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user