From 08a16302cb41ec163e91a3dc398270fd15c54444 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 4 Sep 2024 12:34:46 +0200 Subject: [PATCH] type_object: fix new clippy complaint about length of doc comment (#4527) * type_object: fix new clippy complaint about length of doc comment * all: replace minor version specific links to CPython docs --- guide/src/python-from-rust/calling-existing-code.md | 4 ++-- src/type_object.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/guide/src/python-from-rust/calling-existing-code.md b/guide/src/python-from-rust/calling-existing-code.md index 9c0f592451f..0088353736b 100644 --- a/guide/src/python-from-rust/calling-existing-code.md +++ b/guide/src/python-from-rust/calling-existing-code.md @@ -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 @@ -50,7 +50,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. diff --git a/src/type_object.rs b/src/type_object.rs index 871e8366865..c2604be47ff 100644 --- a/src/type_object.rs +++ b/src/type_object.rs @@ -19,7 +19,8 @@ use crate::{ffi, Bound, Python}; pub unsafe trait PyLayout {} /// `T: PySizedLayout` 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: PyLayout + Sized {}