@@ -118,6 +118,7 @@ The audit identified several issues with the current CLI system:
118
118
2 . ** Command Registry** :
119
119
``` python
120
120
# src/vcspull/cli/main.py
121
+ import typing as t
121
122
import click
122
123
123
124
from vcspull.cli.context import CliContext
@@ -161,15 +162,15 @@ The audit identified several issues with the current CLI system:
161
162
# src/vcspull/cli/context.py
162
163
import typing as t
163
164
import sys
164
- from pydantic import BaseModel, Field
165
+ from pydantic import BaseModel, ConfigDict
165
166
import click
166
167
167
168
class CliContext (BaseModel ):
168
169
""" Context for CLI commands.
169
170
170
171
Manages state and utilities for command execution.
171
172
172
- Attributes
173
+ Parameters
173
174
----
174
175
verbose : bool
175
176
Whether to show verbose output
@@ -182,10 +183,10 @@ The audit identified several issues with the current CLI system:
182
183
quiet: bool = False
183
184
color: bool = True
184
185
185
- model_config = {
186
- " arbitrary_types_allowed" : True ,
187
- " extra" : " forbid" ,
188
- }
186
+ model_config = ConfigDict(
187
+ arbitrary_types_allowed = True ,
188
+ extra = " forbid" ,
189
+ )
189
190
190
191
def info (self , message : str ) -> None :
191
192
""" Display informational message.
@@ -371,6 +372,7 @@ The audit identified several issues with the current CLI system:
371
372
# src/vcspull/cli/commands/info.py
372
373
import typing as t
373
374
import click
375
+ import json
374
376
from pathlib import Path
375
377
376
378
from vcspull.cli.context import CliContext
@@ -475,7 +477,7 @@ The audit identified several issues with the current CLI system:
475
477
fill_char = " ="
476
478
)
477
479
478
- def spinner (self , text : str = " Working..." ) -> t.Optional[click.progressbar ]:
480
+ def spinner (self , text : str = " Working..." ) -> t.Optional[" Spinner " ]:
479
481
""" Create a spinner for indeterminate progress.
480
482
481
483
Parameters
@@ -485,7 +487,7 @@ The audit identified several issues with the current CLI system:
485
487
486
488
Returns
487
489
----
488
- Optional[click.progressbar ]
490
+ Optional[Spinner ]
489
491
Spinner object or None if quiet
490
492
"""
491
493
if self .quiet:
0 commit comments