Skip to content

Commit 2b5d17b

Browse files
committed
!squash more notes
1 parent 353c66a commit 2b5d17b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

notes/proposals/06-cli-system.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ The audit identified several issues with the current CLI system:
118118
2. **Command Registry**:
119119
```python
120120
# src/vcspull/cli/main.py
121+
import typing as t
121122
import click
122123

123124
from vcspull.cli.context import CliContext
@@ -161,15 +162,15 @@ The audit identified several issues with the current CLI system:
161162
# src/vcspull/cli/context.py
162163
import typing as t
163164
import sys
164-
from pydantic import BaseModel, Field
165+
from pydantic import BaseModel, ConfigDict
165166
import click
166167

167168
class CliContext(BaseModel):
168169
"""Context for CLI commands.
169170
170171
Manages state and utilities for command execution.
171172
172-
Attributes
173+
Parameters
173174
----
174175
verbose : bool
175176
Whether to show verbose output
@@ -182,10 +183,10 @@ The audit identified several issues with the current CLI system:
182183
quiet: bool = False
183184
color: bool = True
184185

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+
)
189190

190191
def info(self, message: str) -> None:
191192
"""Display informational message.
@@ -371,6 +372,7 @@ The audit identified several issues with the current CLI system:
371372
# src/vcspull/cli/commands/info.py
372373
import typing as t
373374
import click
375+
import json
374376
from pathlib import Path
375377

376378
from vcspull.cli.context import CliContext
@@ -475,7 +477,7 @@ The audit identified several issues with the current CLI system:
475477
fill_char="="
476478
)
477479

478-
def spinner(self, text: str = "Working...") -> t.Optional[click.progressbar]:
480+
def spinner(self, text: str = "Working...") -> t.Optional["Spinner"]:
479481
"""Create a spinner for indeterminate progress.
480482
481483
Parameters
@@ -485,7 +487,7 @@ The audit identified several issues with the current CLI system:
485487
486488
Returns
487489
----
488-
Optional[click.progressbar]
490+
Optional[Spinner]
489491
Spinner object or None if quiet
490492
"""
491493
if self.quiet:

0 commit comments

Comments
 (0)