Skip to content

Commit

Permalink
no_run
Browse files Browse the repository at this point in the history
  • Loading branch information
termoshtt committed Jan 5, 2024
1 parent 2125174 commit e0ad030
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Python stub file (`*.pyi`) generator for PyO3 based projects.
This crate provides a procedural macro `#[gen_stub_pyfunction]` and others to generate a Python stub file.
It is used with PyO3's `#[pyfunction]` macro. Let's consider a simple example PyO3 project:

```rust
```rust:no_run
use pyo3::prelude::*;
#[pyfunction]
Expand All @@ -26,7 +26,7 @@ fn pyo3_stub_gen_testing(_py: Python, m: &PyModule) -> PyResult<()> {

To generate a stub file for this project, please modify it as follows:

```rust
```rust:no_run
use pyo3::prelude::*;
use pyo3_stub_gen::{derive::gen_stub_pyfunction, StubInfo};
use std::{env, path::*};
Expand All @@ -53,7 +53,7 @@ pub fn stub_info() -> pyo3_stub_gen::Result<StubInfo> {

And then, create an executable target in `src/bin/stub_gen.rs`:

```rust
```rust:no_run
use pyo3_stub_gen::Result;
fn main() -> Result<()> {
Expand Down

0 comments on commit e0ad030

Please sign in to comment.