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] Move the ClassBase enum to its own submodule #14957

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

AlexWaygood
Copy link
Member

Summary

This enum is no longer an implementation detail of how we infer the MROs of classes, so it no longer feels appropriate for it to live in mro.rs. It's not very big right now, so we could move it into types.rs. However, I think our general feeling is that types.rs and infer.rs are both already a little too big, and I also expect this enum to continue to grow as we add support for more special forms and generics. This PR therefore moves the enum to its own submodule, class_base.rs.

Test Plan

All existing tests pass. No new ones are added; this is a pure refactor with no behavioural changes.

@AlexWaygood AlexWaygood added internal An internal refactor or improvement red-knot Multi-file analysis & type inference labels Dec 13, 2024
Copy link
Contributor

github-actions bot commented Dec 13, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@AlexWaygood AlexWaygood merged commit 0bbe166 into main Dec 13, 2024
21 checks passed
@AlexWaygood AlexWaygood deleted the alex/move-class-base branch December 13, 2024 13:12
dcreager added a commit that referenced this pull request Dec 13, 2024
* main:
  [red-knot] Display definition range in trace logs (#14955)
  [red-knot] Move the `ClassBase` enum to its own submodule (#14957)
  [red-knot] mdtest: python version requirements (#14954)
  [airflow]: Import modules that has been moved to airflow providers (AIR303) (#14764)
  [red-knot] Support `typing.TYPE_CHECKING` (#14952)
  Add tracing support to mdtest (#14935)
  Re-enable the fuzzer job on PRs (#14953)
  [red-knot] Improve `match` mdtests (#14951)
  Rename `custom-typeshed-dir`, `target-version` and `current-directory` CLI options (#14930)
  [red-knot] Add narrowing for 'while' loops (#14947)
  [`ruff`]  Skip SQLModel base classes for `mutable-class-default` (`RUF012`) (#14949)
  [red-knot] Tests for 'while' loop boundness (#14944)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement red-knot Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants