Run uv run pre-commit run --all-files

This commit is contained in:
Dillon DuPont
2025-10-24 17:07:58 -07:00
parent 4823256fde
commit bf1de51bff
6 changed files with 2543 additions and 905 deletions

View File

@@ -159,7 +159,9 @@ class BaseWindowHandler(ABC):
pass
@abstractmethod
async def set_window_size(self, window_id: str | int, width: int, height: int) -> Dict[str, Any]:
async def set_window_size(
self, window_id: str | int, width: int, height: int
) -> Dict[str, Any]:
"""Set the size of a window by ID."""
pass

View File

@@ -55,16 +55,14 @@ class HandlerFactory:
raise RuntimeError(f"Failed to determine current OS: {str(e)}")
@staticmethod
def create_handlers() -> (
Tuple[
BaseAccessibilityHandler,
BaseAutomationHandler,
BaseDioramaHandler,
BaseFileHandler,
BaseDesktopHandler,
BaseWindowHandler,
]
):
def create_handlers() -> Tuple[
BaseAccessibilityHandler,
BaseAutomationHandler,
BaseDioramaHandler,
BaseFileHandler,
BaseDesktopHandler,
BaseWindowHandler,
]:
"""Create and return appropriate handlers for the current OS.
Returns:

View File

@@ -182,7 +182,9 @@ class GenericWindowHandler(BaseWindowHandler):
except Exception as e:
return {"success": False, "error": str(e)}
async def set_window_size(self, window_id: int | str, width: int, height: int) -> Dict[str, Any]:
async def set_window_size(
self, window_id: int | str, width: int, height: int
) -> Dict[str, Any]:
try:
if pwc is None:
return {"success": False, "error": "pywinctl not available"}

View File

@@ -75,9 +75,14 @@ except Exception:
except Exception:
package_version = "unknown"
accessibility_handler, automation_handler, diorama_handler, file_handler, desktop_handler, window_handler = (
HandlerFactory.create_handlers()
)
(
accessibility_handler,
automation_handler,
diorama_handler,
file_handler,
desktop_handler,
window_handler,
) = HandlerFactory.create_handlers()
handlers = {
"version": lambda: {"protocol": protocol_version, "package": package_version},
# App-Use commands