Skip to content

[stubgen] Preserve dataclass_transform decorator - #18418

Merged
hauntsaninja merged 2 commits into
python:masterfrom
cdce8p:stubgen-preserve-dataclass_transform
Jan 7, 2025
Merged

hauntsaninja merged 2 commits into
python:masterfrom
cdce8p:stubgen-preserve-dataclass_transform

Conversation

@cdce8p

@cdce8p cdce8p commented Jan 5, 2025

Copy link
Copy Markdown
Collaborator

Ref: #18081

@hamdanal hamdanal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Could you add a non-semanal test?

@cdce8p

cdce8p commented Jan 5, 2025

Copy link
Copy Markdown
Collaborator Author

Could you add a non-semanal test?

Not sure that would be helpful here. All cases for dataclass_transform depend on the semantic analysis. Without it, the derived classes wouldn't be recognized as dataclass. I.e. the tests would all fail AFAICT.

@hamdanal

hamdanal commented Jan 5, 2025

Copy link
Copy Markdown
Collaborator

I still think it is useful to have a test, just to be sure we do not generate a broken syntax or something. You can leave a comment in the test saying that it is not expected to work as good as with semantic analysis.

@hauntsaninja hauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants