Skip to content

Comments

Avoid treating dataclasses.KW_ONLY as typing-only#12863

Merged
charliermarsh merged 1 commit intomainfrom
charlie/kw-data
Aug 13, 2024
Merged

Avoid treating dataclasses.KW_ONLY as typing-only#12863
charliermarsh merged 1 commit intomainfrom
charlie/kw-data

Conversation

@charliermarsh
Copy link
Member

Summary

Closes #12859.

@charliermarsh charliermarsh added the bug Something isn't working label Aug 13, 2024
@codspeed-hq
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%

@github-actions
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
@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