PyO3 / PyO3/pyo3

Document all `unsafe` blocks

Open
#5,487 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation help-wanted
Dominant language
Rust
Stars
16.2k
Forks
1k
Avg merge
2d 6h
Merged PRs (30d)
66

Description

Starting with #5484 we're adding the clippy::undocumented_unsafe_blocks lint to instance.rs. We should expand this across the codebase.

For now this probably requires picking a file, enabling the lint at the top, and fixing the undocumented blocks.

Once we've covered enough of the codebase we should be able to switch to having a top-level warn and per-file allows. We can then work to remove the per-file allows.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with #5484 and instance.rs, where the undocumented-unsafe-blocks lint is already being enabled. Choose a code file, enable the lint at its top, and inspect each undocumented unsafe block. Done means the selected file passes with the lint enabled and its unsafe blocks are documented; broader coverage and top-level enforcement remain future work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.