feat: Implement MFA authentication flow with garth for CLI

This commit implements the multi-factor authentication (MFA) flow for the CLI
using the garth library, as specified in task 007.

Changes include:
- Created  to handle API communication with robust error handling.
- Refactored  to correctly implement the logout logic
  and ensure proper handling of API client headers.
- Updated  with Black, Flake8, Mypy, and Isort configurations.
- Implemented and refined integration tests for authentication, sync operations,
  and sync status checking, including mocking for the API client.
- Renamed integration test files for clarity and consistency.
- Updated  to reflect task completion.
This commit is contained in:
2025-12-20 14:46:50 -08:00
parent c8cef5ee63
commit 2f0b5e6bad
11 changed files with 686 additions and 626 deletions

View File

@@ -1,32 +1,17 @@
[tool.black]
line-length = 88
target-version = ['py312']
include = '\.pyi?$'
[tool.isort]
profile = "black"
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 88
target-version = ['py313']
[tool.flake8]
max-line-length = 88
extend-ignore = [
"E203", # whitespace before ':'
"W503", # line break before binary operator
]
max-complexity = 10
extend-ignore = ["E203", "W503"]
[tool.isort]
profile = "black"
line_length = 88
[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unreachable = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
ignore_missing_imports = true # Temporarily ignore until all stubs are available