Skip to content

Commit 2ef53ae

Browse files
cursoragentjmjava
andcommitted
Fix ruff F402 and mark visual-map-field-strings gates as run
Rename the visual_map field loop variable so it does not shadow dataclasses.field. ruff, pytest (641 passed, 1 skipped), and docgen benchmark are green. Co-authored-by: jmjava <jmjava@gmail.com>
1 parent d0de44b commit 2ef53ae

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎milestones/visual-map-field-strings.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Milestone: visual_map type/scene/source and segment_names values must be strings
22

33
**Status:** Active
4-
**PR:** pending
4+
**PR:** [#108](https://github.com/jmjava/documentation-generator/pull/108)
55
**Depends on:** `milestones/generation-model-strings.md` (PR #107),
66
`milestones/visual-map-row-types.md` (PR #86),
77
`milestones/segment-id-strings.md` (PR #87)
@@ -31,9 +31,9 @@ Fail closed at `Config.from_yaml`. Missing fields stay optional.
3131
be YAML strings (empty allowed).
3232
- [x] Present `segment_names` values must be non-empty YAML strings.
3333
- [x] Tests for list values of those keys.
34-
- [ ] `ruff check src/ tests/`
35-
- [ ] `pytest tests/`
36-
- [ ] `docgen benchmark` (no clock change)
34+
- [x] `ruff check src/ tests/`
35+
- [x] `pytest tests/`
36+
- [x] `docgen benchmark` (no clock change)
3737

3838
## Out of scope
3939

‎src/docgen/config.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,11 @@ def __post_init__(self) -> None:
250250
f"{src}: visual_map.{sid_s} must be a YAML mapping, "
251251
f"not {type(spec).__name__}"
252252
)
253-
for field in ("type", "scene", "class", "source"):
254-
val = spec.get(field)
253+
for fname in ("type", "scene", "class", "source"):
254+
val = spec.get(fname)
255255
if val is not None and not isinstance(val, str):
256256
raise ConfigError(
257-
f"{src}: visual_map.{sid_s}.{field} must be a YAML string, "
257+
f"{src}: visual_map.{sid_s}.{fname} must be a YAML string, "
258258
f"not {type(val).__name__}"
259259
)
260260
wiz = self._block("wizard")

0 commit comments

Comments
 (0)