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

Avoid treating dataclasses.KW_ONLY as typing-only #12863

Merged
merged 1 commit into from
Aug 13, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

Closes #12859.

@charliermarsh charliermarsh added the bug Something isn't working label Aug 13, 2024
Copy link

codspeed-hq bot commented Aug 13, 2024

CodSpeed Performance Report

Merging #12863 will degrade performances by 4.1%

Comparing charlie/kw-data (d051027) with main (899a523)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 30 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main charlie/kw-data Change
linter/all-rules[numpy/globals.py] 765 µs 723.1 µs +5.8%
linter/default-rules[pydantic/types.py] 1.8 ms 1.9 ms -4.1%

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

These special cases hurt so badly. But it's not our fault, just something we have to live with since Python's semantics are what they are!

PEP 649 can't land soon enough :(

@charliermarsh charliermarsh merged commit e05953a into main Aug 13, 2024
19 of 20 checks passed
@charliermarsh charliermarsh deleted the charlie/kw-data branch August 13, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TCH003 false-positive when using dataclasses.KW_ONLY
2 participants