| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
WalkthroughAdds a new Python-visible boolean attribute has_stable_extractable_node to the _uuid module by exporting a constant HAS_STABLE_EXTRACTABLE_NODE = false. No other logic or control flow is changed. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands and usage tips. |
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)stdlib/src/uuid.rs (1)📜 Review details11-15: Avoid redundant get_mac_address() call (minor cleanup).
The match arm discards the first result and calls get_mac_address() again; use the captured value instead.
- match get_mac_address() { - Ok(Some(_ma)) => get_mac_address().unwrap().unwrap().bytes(), + match get_mac_address() { + Ok(Some(ma)) => ma.bytes(), // os_random is expensive, but this is only ever called once _ => rustpython_common::rand::os_random::<6>(), }
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📥 CommitsReviewing files that changed from the base of the PR and between 6ead821 and 216d117.
⛔ Files ignored due to path filters (2)📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.rs: Format Rust code with the default rustfmt style (run cargo fmt)
Run clippy and fix any warnings or lints introduced by your changes
Follow Rust best practices for error handling and memory management
Files:
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use RustPython macros (pyclass, pymodule, pyfunction, etc.) when implementing Python functionality in Rust
Files:
stdlib/src/uuid.rs (1)34-35: Align HAS_STABLE_EXTRACTABLE_NODE export with existing flag style or confirm CPython expectation
has_uuid_generate_time_safe is exported as #[pyattr] fn -> u32 while HAS_STABLE_EXTRACTABLE_NODE is a const bool (stdlib/src/uuid.rs:34–35). No Python-side uses found in this repo — confirm whether CPython's stdlib uuid.py expects an int (0/1) or a bool.
If CPython expects int (0/1) — replace with fn returning u32:
- #[pyattr(name = "has_stable_extractable_node")] - const HAS_STABLE_EXTRACTABLE_NODE: bool = false; + #[pyattr(name = "has_stable_extractable_node")] + fn has_stable_extractable_node(_vm: &VirtualMachine) -> u32 { + 0 + }If CPython expects bool — keep as-is.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes #5732
Summary by CodeRabbit