MagicStack / MagicStack/MagicPython
Built-in keywords on dataclasses
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
- Editor name and version: VS Code July 1.48.1 (latest)
- Platform: OS X
- Color scheme: One Dark Pro
- MagicPython version: VS Code's version
- 5-10 lines of surrounding code:
@dataclass
class SkipListNode(Generic[KT, VT]):
key: KT
value: VT
next: List[SkipListNode[KT, VT]] = field(default_factory=list)
- A screenshot:
In the screenshot, next is highlighted as a keyword. However, I don't believe that it should be, as it will only ever be accessed as self.next or SkipListNode.next.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the highlighting in VS Code using the dataclass snippet from the report, then trace the Python syntax-highlighting rule that marks the dataclass field name next as a keyword. Done means next is not highlighted as a keyword in this context while genuine Python keywords remain correctly highlighted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100