Skip to content

Commit 00690e1

Browse files
committed
cli(add) Document ConfigFileResolution fields
why: the rendered API page listed the three fields as "Alias for field number N", autodoc's boilerplate for a NamedTuple descriptor, which tells a reader nothing. The published docs carry no such entries because the class is new here. what: - Describe each field in an Attributes section, which also replaces the generated stubs with the prose and type
1 parent 0495216 commit 00690e1

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/vcspull/cli/add.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,17 @@ def _resolve_placement(
458458

459459

460460
class ConfigFileResolution(t.NamedTuple):
461-
"""Outcome of deciding which config file ``add`` should write to."""
461+
"""Outcome of deciding which config file ``add`` should write to.
462+
463+
Attributes
464+
----------
465+
path : pathlib.Path | None
466+
Config file to write to, or ``None`` when the choice was ambiguous.
467+
creates_new_default : bool
468+
Whether writing creates a config file that did not exist yet.
469+
ambiguous : bool
470+
Whether several home config files matched, so none can be chosen.
471+
"""
462472

463473
path: pathlib.Path | None
464474
creates_new_default: bool

0 commit comments

Comments
 (0)