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] Make the VERSIONS parser use ModuleName as its key type #11968

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

AlexWaygood
Copy link
Member

Summary

The same invariants apply when constructing module names in the VERSIONS parser as the ones that apply when creating module names elsewhere in the module resolver. We should therefore reuse the same abstraction, which checks these invariants in its new() methods

Test Plan

cargo test -p red_knot_modules_resolver

@AlexWaygood AlexWaygood added the red-knot Multi-file analysis & type inference label Jun 21, 2024
Base automatically changed from move-versions-logic to main June 21, 2024 15:41
@AlexWaygood AlexWaygood enabled auto-merge (squash) June 21, 2024 15:42
@AlexWaygood AlexWaygood merged commit da79bac into main Jun 21, 2024
18 of 19 checks passed
@AlexWaygood AlexWaygood deleted the versions-modulename branch June 21, 2024 15:46
Copy link

codspeed-hq bot commented Jun 21, 2024

CodSpeed Performance Report

Merging #11968 will degrade performances by 4.82%

Comparing versions-modulename (b730543) with main (8de0cd6)

Summary

❌ 1 regressions
✅ 29 untouched benchmarks

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

Benchmarks breakdown

Benchmark main versions-modulename Change
linter/default-rules[pydantic/types.py] 1.8 ms 1.9 ms -4.82%

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

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

PlasmaPy/PlasmaPy (+1 -0 violations, +0 -0 fixes)

+ src/plasmapy/diagnostics/langmuir.py:1396:23: NPY201 `np.trapz` will be removed in NumPy 2.0. Use `numpy.trapezoid` on NumPy 2.0, or ignore this warning on earlier versions.

Changes by rule (1 rules affected)

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

Linter (preview)

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

PlasmaPy/PlasmaPy (+1 -0 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

+ src/plasmapy/diagnostics/langmuir.py:1396:23: NPY201 `np.trapz` will be removed in NumPy 2.0. Use `numpy.trapezoid` on NumPy 2.0, or ignore this warning on earlier versions.

Changes by rule (1 rules affected)

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

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.

2 participants