Skip to content

Commit 7311f16

Browse files
authored
♻️ split NeedItem internal data into core, extras, links and backlinks (#1490)
1 parent 4250433 commit 7311f16

File tree

5 files changed

+624
-55
lines changed

5 files changed

+624
-55
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ dev = ["pre-commit~=3.0", "tox~=4.23", "tox-uv~=1.15"]
7474

7575
[tool.pytest.ini_options]
7676
markers = [
77+
"fixture_file: marks tests that use a fixture file (deselect with '-m \"not fixture_file\"')",
7778
"jstest: marks tests as JavaScript test (deselect with '-m \"not jstest\"')",
7879
"benchmark: marks tests as expensive benchmark test (deselect with '-m \"not benchmark\"')",
7980
]

sphinx_needs/api/need.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,9 @@ def generate_need(
352352
"section_name": sections[0] if sections else None,
353353
"signature": signature,
354354
"parent_need": parent_need,
355-
**extras, # type: ignore[typeddict-item]
356-
**links,
357-
**{f"{li['option']}_back": [] for li in needs_config.extra_links},
358355
}
359356

360-
needs_info = NeedItem(needs_data)
357+
needs_info = NeedItem(core=needs_data, extras=extras, links=links, _validate=False)
361358

362359
if jinja_content:
363360
need_content_context: dict[str, Any] = {**needs_info}

0 commit comments

Comments
 (0)