Skip to content

Commit

Permalink
type_object: fix new clippy complaint about length of doc comment (#4527
Browse files Browse the repository at this point in the history
)

* type_object: fix new clippy complaint about length of doc comment

* all: replace minor version specific links to CPython docs
  • Loading branch information
birkenfeld authored Sep 4, 2024
1 parent 3496f49 commit 3d5d408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions guide/src/python-from-rust/calling-existing-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn main() -> PyResult<()> {
## Want to run just an expression? Then use `eval_bound`.

[`Python::eval_bound`]({{#PYO3_DOCS_URL}}/pyo3/marker/struct.Python.html#method.eval_bound) is
a method to execute a [Python expression](https://docs.python.org/3.7/reference/expressions.html)
a method to execute a [Python expression](https://docs.python.org/3/reference/expressions.html)
and return the evaluated value as a `Bound<'py, PyAny>` object.

```rust
Expand All @@ -51,7 +51,7 @@ Python::with_gil(|py| {
## Want to run statements? Then use `run_bound`.

[`Python::run_bound`] is a method to execute one or more
[Python statements](https://docs.python.org/3.7/reference/simple_stmts.html).
[Python statements](https://docs.python.org/3/reference/simple_stmts.html).
This method returns nothing (like any Python statement), but you can get
access to manipulated objects via the `locals` dict.

Expand Down
3 changes: 2 additions & 1 deletion src/type_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ use crate::{ffi, Bound, Python};
pub unsafe trait PyLayout<T> {}

/// `T: PySizedLayout<U>` represents that `T` is not a instance of
/// [`PyVarObject`](https://docs.python.org/3.8/c-api/structures.html?highlight=pyvarobject#c.PyVarObject).
/// [`PyVarObject`](https://docs.python.org/3/c-api/structures.html#c.PyVarObject).
///
/// In addition, that `T` is a concrete representation of `U`.
pub trait PySizedLayout<T>: PyLayout<T> + Sized {}

Expand Down

0 comments on commit 3d5d408

Please sign in to comment.