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] Extract red_knot_python_semantic crate #11926

Merged
merged 3 commits into from
Jun 20, 2024

Conversation

MichaReiser
Copy link
Member

Summary

Extract the red knot code from ruff_python_semantic and move it into its own crate because we don't expect to share any logic between the two semantic models.

Test Plan

cargo build

@MichaReiser MichaReiser requested a review from carljm as a code owner June 18, 2024 14:16
@MichaReiser MichaReiser linked an issue Jun 18, 2024 that may be closed by this pull request
@MichaReiser MichaReiser added the red-knot Multi-file analysis & type inference label Jun 18, 2024
@MichaReiser MichaReiser changed the base branch from main to salsa-8-types June 18, 2024 14:16
@MichaReiser MichaReiser force-pushed the salsa-9-red_knot_python_semantic branch from 377196e to 05ec870 Compare June 18, 2024 14:18
@MichaReiser
Copy link
Member Author

Oh, I missed some doctests. I'll fix the test failures before merging.

Base automatically changed from salsa-8-types to main June 20, 2024 10:49
@MichaReiser MichaReiser force-pushed the salsa-9-red_knot_python_semantic branch from 05ec870 to 9fbb4f7 Compare June 20, 2024 10:56
@@ -177,15 +179,6 @@ impl std::fmt::Display for ModuleName {
}
}

#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed this declaration and instead use the one from red_knot_python_semantic to silence cargo shear that the red_knot_python_semantic crate is unused (which is true, but not for long)

@MichaReiser MichaReiser force-pushed the salsa-9-red_knot_python_semantic branch from 9abe86f to 4c189af Compare June 20, 2024 11:19
@MichaReiser MichaReiser merged commit 2dfbf11 into main Jun 20, 2024
19 checks passed
@MichaReiser MichaReiser deleted the salsa-9-red_knot_python_semantic branch June 20, 2024 11:24
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+1 -0 violations, +0 -0 fixes in 1 projects; 49 projects unchanged)

python/typeshed (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select E,F,FA,I,PYI,RUF,UP,W

+ stdlib/dis.pyi:144:1: E999 SyntaxError: unexpected EOF while parsing

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
E999 1 1 0 0 0

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

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.

[red-knot] Create red-knot-python-semantic crate
3 participants