Skip to content

[stubgen] Preserve dataclass_transform decorator#18418

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

[stubgen] Preserve dataclass_transform decorator#18418
hauntsaninja merged 2 commits intopython:masterfrom
cdce8p:stubgen-preserve-dataclass_transform

Conversation

@cdce8p
Copy link
Collaborator

@cdce8p cdce8p commented Jan 5, 2025

Ref: #18081

Copy link
Collaborator

@hamdanal hamdanal left a comment

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
Copy link
Collaborator Author

cdce8p commented Jan 5, 2025

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
Copy link
Collaborator

hamdanal commented Jan 5, 2025

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.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

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