Skip to content

Fix Python dataclass field extraction - #2626

Merged
Widthdom merged 3 commits into
mainfrom
codex/fix-issue2057-latest
May 24, 2026
Merged

Fix Python dataclass field extraction#2626
Widthdom merged 3 commits into
mainfrom
codex/fix-issue2057-latest

Conversation

@Widthdom

@Widthdom Widthdom commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Distinguish Python dataclass field(...) class attributes and index field metadata keys.
  • Emit references for dataclass field default factories, metadata keys, and fields(MyClass) introspection.
  • Add focused coverage for multiline dataclass field(...) calls and multiline metadata dictionaries.

Fixes #2057

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter Dataclass --no-restore -p:UseSharedCompilation=false
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false

Documentation / changelog

  • Added changelog fragment: changelog.d/unreleased/2057.fixed.md

Review

  • Adversarial review round 1 found multiline field references were missing; fixed.
  • Adversarial review round 2 found multiline metadata dict references were missing; fixed.

Follow-up candidates

@Widthdom
Widthdom marked this pull request as ready for review May 24, 2026 12:43
@Widthdom
Widthdom merged commit 8dc93ca into main May 24, 2026
10 checks passed
@Widthdom
Widthdom deleted the codex/fix-issue2057-latest branch May 24, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python dataclass field() introspection and field-level metadata not extracted

1 participant