From acfb1c85e1f2750b1e5d07f078c6e03b4408c766 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:03:59 +0000 Subject: Refactor: Extract store type names to constant for better maintainability Co-authored-by: tranch <5999732+tranch@users.noreply.github.com> --- __pycache__/mock_decky_server.cpython-312.pyc | Bin 0 -> 29089 bytes decky_client.py | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 __pycache__/mock_decky_server.cpython-312.pyc diff --git a/__pycache__/mock_decky_server.cpython-312.pyc b/__pycache__/mock_decky_server.cpython-312.pyc new file mode 100644 index 0000000..5f59a82 Binary files /dev/null and b/__pycache__/mock_decky_server.cpython-312.pyc differ diff --git a/decky_client.py b/decky_client.py index 5fda567..38726ce 100644 --- a/decky_client.py +++ b/decky_client.py @@ -17,6 +17,13 @@ EVENT = 3 # Default store URL DEFAULT_STORE_URL = "https://plugins.deckbrew.xyz/plugins" +# Store type mapping +STORE_TYPE_NAMES = { + 0: "default", + 1: "testing", + 2: "custom" +} + def log(*args: Any) -> None: """Print formatted logs to stderr.""" @@ -351,7 +358,7 @@ async def get_store_url() -> str: if msg.get("type") == REPLY: store_type = msg.get('result') - store_type_name = {0: "default", 1: "testing", 2: "custom"}.get(store_type, f"unknown ({store_type})") + store_type_name = STORE_TYPE_NAMES.get(store_type, f"unknown ({store_type})") log(f"Current store type: {store_type_name}") elif msg.get("type") == ERROR: log(f"Server error: {msg.get('error')}") -- cgit v1.2.3