mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-26 00:51:44 +00:00
This commit introduces a global option to the GarminSync CLI, providing verbose logging and diagnostic information for troubleshooting. Key changes include: - Implemented a to manage and propagate the debug flag across CLI commands. - Refactored in to accept and utilize the debug flag, enabling detailed logging of HTTP requests and responses. - Updated CLI commands (, ) to access the from the . - Resolved circular import by extracting into a dedicated module. - Configured for Poetry-based dependency management. - Addressed various type hinting issues and linting warnings across the CLI codebase to maintain code quality.
11 lines
314 B
Python
11 lines
314 B
Python
import click
|
|
from typing import Optional
|
|
from .api.client import ApiClient # Import ApiClient
|
|
|
|
class CliContext:
|
|
def __init__(self):
|
|
self.debug = False
|
|
self.api_client: Optional[ApiClient] = None # Store ApiClient instance
|
|
|
|
pass_cli_context = click.make_pass_decorator(CliContext, ensure=True)
|