-
Notifications
You must be signed in to change notification settings - Fork 37
Remove incorrect @dataclass decorators from ABC base classes and all subclasses #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: ChenZiHong-Gavin <58508660+ChenZiHong-Gavin@users.noreply.github.com>
Co-authored-by: ChenZiHong-Gavin <58508660+ChenZiHong-Gavin@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix problem
Co-authored-by: ChenZiHong-Gavin <58508660+ChenZiHong-Gavin@users.noreply.github.com>
…to copilot/change-code-style-dataclass
|
@copilot Main branch has been merged, please review new files and make changes when necessary. |
Co-authored-by: ChenZiHong-Gavin <58508660+ChenZiHong-Gavin@users.noreply.github.com>
Reviewed new files from main branch merge. Fixed in commit [hash]. Changes made:
All other new files (BaseReader, AnchorBFSPartitioner, reader implementations) follow correct patterns. |
Co-authored-by: ChenZiHong-Gavin <58508660+ChenZiHong-Gavin@users.noreply.github.com>
Fixed in commit [hash]. Removed Tokenizers:
Partitioners:
Evaluators:
KG Builders:
All classes now properly inherit from their base classes using standard Python inheritance instead of dataclass. |
✅ All dataclass decorator issues have been fixed!
Changes Made
Base Classes
Removed
@dataclassdecorator from 15 ABC base classes that define interfaces rather than data structures:Search Classes
Fixed classes that incorrectly used
@dataclasswith custom__init__methods:Subclasses - Complete Refactor
Following the pattern established for generators (commit e5954e9), removed
@dataclassfrom all subclasses that inherit from base classes with__init__methods:Storage Classes (added parent field declarations):
Tokenizer Classes (converted to use
__init__withsuper().__init__()):Generator Classes (removed @DataClass, use standard inheritance):
Partitioner Classes (removed @DataClass):
Evaluator Classes (converted to use
__init__withsuper().__init__()):KG Builder Classes (converted to use
__init__withsuper().__init__()):Summary
Fixed incorrect
@dataclassusage throughout the codebase:All subclasses now properly inherit from their base classes using:
__init__methods withsuper().__init__()calls for classes with custom initializationFiles Modified:
graphgen/bases/graphgen/models/search/graphgen/models/storage/graphgen/models/tokenizer/graphgen/models/generator/graphgen/models/partitioner/graphgen/models/evaluator/graphgen/models/kg_builder/graphgen/models/llm/All changes maintain backward compatibility and all files pass Python compilation checks.
Fixes #67
Original prompt
Fixes #67
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.