Skip to content

Fix missing workspace lints & fix lints - #8781

Draft
joshuamegnauth54 wants to merge 1 commit into
RustPython:mainfrom
joshuamegnauth54:deprecated-constants
Draft

joshuamegnauth54 wants to merge 1 commit into
RustPython:mainfrom
joshuamegnauth54:deprecated-constants

Conversation

@joshuamegnauth54

@joshuamegnauth54 joshuamegnauth54 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Some of the workspace packages were missing the [lints] table. I enabled the lints then fixed the resulting errors.

  • Closes #xxxx

One of checkbox below must be checked.

  • I did not use AI to write the code of this patch.
  • This PR follows our AI policy

Summary

  • Add missing [lints] table to a few Cargo.toml.
  • Fix lints that arose from those lints being enabled.

Summary by CodeRabbit

  • Chores

    • Standardized lint configuration across additional components.
    • Aligned selected dependency versions with workspace settings.
  • Refactor

    • Restricted internal utilities and helper APIs to their intended scopes.
    • Simplified iteration, ownership, formatting, and import patterns across the codebase.
    • Added safeguards encouraging callers to use returned values.
    • Updated an internal data structure layout for C-compatible alignment.
  • Behavior

    • No user-facing functionality or runtime behavior changes.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: RustPython/RustPython/.coderabbit.yml

Review profile: CHILL

Plan: Advanced

Run ID: fd9395eb-fdc8-4bf0-a639-857f79669b9e

📥 Commits

Reviewing files that changed from the base of the PR and between 50222f7 and f0204e9.

📒 Files selected for processing (18)
  • crates/codegen/src/ir.rs
  • crates/common/src/wtf8_index.rs
  • crates/host_env/src/os.rs
  • crates/literal/src/complex.rs
  • crates/literal/src/escape.rs
  • crates/literal/src/float.rs
  • crates/vm/src/exceptions.rs
  • crates/vm/src/gc_state.rs
  • crates/vm/src/stdlib/_ctypes/structure.rs
  • crates/vm/src/stdlib/_ctypes/union.rs
  • crates/vm/src/stdlib/_io.rs
  • crates/vm/src/stdlib/gc.rs
  • crates/vm/src/stdlib/sys/monitoring.rs
  • crates/wtf8/src/concat.rs
  • crates/wtf8/src/lib.rs
  • src/interpreter.rs
  • src/lib.rs
  • src/settings.rs
💤 Files with no reviewable changes (3)
  • crates/vm/src/stdlib/_ctypes/structure.rs
  • crates/host_env/src/os.rs
  • crates/vm/src/stdlib/_ctypes/union.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/literal/src/float.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The pull request enables workspace lint inheritance, centralizes selected dependency versions, narrows internal Rust visibility, adds must-use annotations, updates equivalent type declarations, and applies mechanical iterator and ownership cleanups.

Changes

Rust workspace and API cleanup

Layer / File(s) Summary
Workspace lint and dependency declarations
Cargo.toml, crates/literal/Cargo.toml, crates/wtf8/Cargo.toml, crates/host_env/Cargo.toml
The root package and two crates inherit workspace lints. Selected host_env dependencies now use workspace-managed versions.
Internal API visibility boundaries
crates/wtf8/src/concat.rs, crates/wtf8/src/core_char.rs, crates/wtf8/src/core_str.rs, src/shell/helper.rs
WTF-8 helpers and ShellHelper APIs are restricted to crate or parent-module scope. The Cow bounds and completion context declaration are updated.
Literal and WTF-8 API contracts
crates/literal/src/*.rs, crates/wtf8/src/lib.rs, src/interpreter.rs
Value-returning APIs gain #[must_use]. WTF-8 implementations use equivalent Self-based declarations and constructors.
Source and runtime cleanup
crates/common/src/*.rs, crates/codegen/src/ir.rs, crates/stdlib/src/*.rs, crates/vm/src/**/*.rs, src/lib.rs, src/settings.rs
Imports, layouts, iterator loops, ownership operations, logging syntax, and exception state handling are simplified. Described runtime behavior remains unchanged.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Suggested reviewers: youknowone, shaharnaveh

Merge Risk: ⚪ Minimal · up to f0204

This PR enables workspace lints and applies API and mechanical cleanup changes without identified production behavior changes or unresolved merge-blocking risk. It is ready to merge after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 74.84% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 159 functions across 19 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: adding missing workspace lint configuration and fixing the resulting lint issues.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🧪 Generate unit tests (beta)
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@joshuamegnauth54
joshuamegnauth54 marked this pull request as draft September 22, 2026 01:11
Some of the workspace packages were missing the `[lints]` table. I
enabled the lints then fixed the resulting errors.
@joshuamegnauth54
joshuamegnauth54 marked this pull request as ready for review September 22, 2026 14:44
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@joshuamegnauth54
joshuamegnauth54 marked this pull request as draft September 22, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant