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

[red-knot] Narrowing - Not operator #13942

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

TomerBin
Copy link
Contributor

Summary

After #13918 has landed, narrowing constraint negation became easy, so adding support for not operator.

Test Plan

I added a new mdtest file for not expression, but maybe we should spread it over the other test files (by adding not cases to each one of them)? I'll be happy to hear your preference around that :)

Copy link
Contributor

github-actions bot commented Oct 27, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@TomerBin TomerBin marked this pull request as ready for review October 27, 2024 21:30
@MichaReiser MichaReiser added the red-knot Multi-file analysis & type inference label Oct 28, 2024
Copy link
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

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

This is awesome, thank you!!

@carljm
Copy link
Contributor

carljm commented Oct 28, 2024

I added a new mdtest file for not expression, but maybe we should spread it over the other test files (by adding not cases to each one of them)? I'll be happy to hear your preference around that :)

I like what you've done here. I think in general any feature that makes sense to make a PR to add, probably makes sense to have a dedicated file to test as well. Which of course isn't incompatible with perhaps also having it occasionally show up in tests of other features, too, but not in a "must add it everywhere" way.

@carljm carljm enabled auto-merge (squash) October 28, 2024 20:25
@carljm carljm merged commit 74cf66e into astral-sh:main Oct 28, 2024
18 checks passed
@TomerBin TomerBin deleted the tomer/narrow-not-expression branch October 28, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
red-knot Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants