Skip to content
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

Add tests for dataclasses that use Slots and Keyword-Only options. #56

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

brocla
Copy link
Contributor

@brocla brocla commented Mar 28, 2024

A test is added to verify that the new dataclass features, slots and kw_only, can be parsed by the Representer.

The three examples used are: sgf_parsing, go_counting, and tree_building. They were chosen because their solutions already use dataclasses, making it easier to demonstrate the new features.

This comment was marked as resolved.

@github-actions github-actions bot closed this Mar 28, 2024
@BethanyG BethanyG reopened this Mar 28, 2024
@brocla
Copy link
Contributor Author

brocla commented Apr 4, 2024

The test is failing on this PR because of code like this,

@dataclass(slots=True)   #***
class Record:
    record_id: int
    parent_id: int = field(kw_only=True)

Perhaps I don't have access to the latest update that fixed this issue. I'm a bit stuck.

@BethanyG
Copy link
Member

BethanyG commented Apr 4, 2024

I'll take a look.

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.

2 participants