GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — reason inside #[allow] by youknowone · Pull Request #7049 · RustPython/RustPython

Conversation

@youknowone

@youknowone youknowone commented Feb 8, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Enhanced code quality with comprehensive lint attribute documentation and reasoning across the codebase.
    • Optimized internal sorting implementation for improved clarity.
    • Refined lint configuration with explicit justifications for all suppressions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@youknowone
reason inside #[allow]
f63d168
@youknowone
youknowone requested a review from ShaharNaveh February 8, 2026 12:02
@coderabbitai

coderabbitai Bot commented Feb 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR systematically adds reason annotations to existing Clippy lint suppressions across 19 crates, improving lint documentation with explicit justifications. Additionally, minor functional changes include adding a get_thread_id field to a lock primitive, switching a sort method, and removing a lint suppression.

Changes

Cohort / File(s) Summary
Lock and Synchronization Primitives
crates/common/src/lock/cell_lock.rs, crates/common/src/lock/thread_mutex.rs, crates/common/src/signal.rs
Expanded clippy allow attributes with reasons on lock/sync primitives. Added get_thread_id: G field to RawThreadMutex and updated thread-ID checks to use it; no signature changes.
Clippy Lint Annotation Updates
crates/codegen/src/compile.rs, crates/common/src/str.rs, crates/sre_engine/src/engine.rs, crates/stdlib/src/json/machinery.rs, crates/stdlib/src/overlapped.rs, crates/stdlib/src/statistics.rs, crates/vm/src/builtins/module.rs, crates/vm/src/builtins/str.rs, crates/vm/src/exceptions.rs, crates/vm/src/signal.rs, crates/vm/src/stdlib/ctypes/base.rs, crates/vm/src/stdlib/winapi.rs
Converted single-line clippy allow attributes to multi-line forms with explanatory reason parameters, improving lint documentation without behavioral changes.
Macro and Attribute Enhancements
crates/vm/src/macros.rs
Added reason annotations to match_class and identifier_utf8 macro arms, clarifying lint suppressions in macro contexts.
Lint Suppression Refinement
crates/vm/src/object/core.rs
Removed non_send_fields_in_send_ty suppression from PyWeak threading config; added reason to diverging_sub_expression allowance in partially_init macro.
Build Script and Sorting Updates
crates/stdlib/build.rs, crates/derive-impl/src/util.rs
Added clippy reasons for byte-grouping suppressions in ossl_vers array and ssl-openssl config. Changed sort_by comparator to sort_by_key for ValidatedItemNursery items.
Lint Suppression Removal
crates/vm/src/builtins/function.rs
Removed needless_match suppression from PyBoundMethod::repr_str, enabling lint checking.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • RustPython/RustPython#6961: Both PRs modify pattern handling in crates/codegen/src/compile.rs and touch the mapping-pattern area with lint attribute adjustments.

Suggested reviewers

  • ShaharNaveh
  • arihant2math

Poem

🐰 Lint reasons now rest where lint warnings once cried,
Each suppress adorned with a "why" by its side,
From locks to macros, from builds to the thread,
Clippy's confusions are carefully shed! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'reason inside #[allow]' directly describes the main change across all modified files: adding reason annotations to Clippy lint allow attributes throughout the codebase.
Docstring Coverage ✅ Passed Docstring coverage is 92.31% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ShaharNaveh
ShaharNaveh approved these changes Feb 8, 2026
View reviewed changes

@ShaharNaveh ShaharNaveh left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is good, I think a good next step will be to replace "allow" with "expect". this will let us remove any unused lines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@youknowone
youknowone marked this pull request as ready for review February 8, 2026 12:44
@youknowone
youknowone enabled auto-merge (squash) February 8, 2026 12:54
@youknowone
youknowone merged commit 5dabad6 into RustPython:main Feb 8, 2026
13 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@youknowone
youknowone deleted the allow-reasons branch February 8, 2026 13:11
youknowone added a commit that referenced this pull request Sep 16, 2026
@youknowone
reason inside #[allow] (#7049)
a5fc3a8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ShaharNaveh ShaharNaveh ShaharNaveh approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@youknowone @ShaharNaveh
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.