pyo3_stub_gen/
generate.rs

1//! Generate Python typing stub file a.k.a. `*.pyi` file.
2
3mod arg;
4mod class;
5mod docstring;
6mod enum_;
7mod error;
8mod function;
9mod member;
10mod method;
11mod module;
12mod stub_info;
13mod variable;
14
15pub use arg::*;
16pub use class::*;
17pub use enum_::*;
18pub use error::*;
19pub use function::*;
20pub use member::*;
21pub use method::*;
22pub use module::*;
23pub use stub_info::*;
24pub use variable::*;
25
26use crate::stub_type::ModuleRef;
27use std::collections::HashSet;
28
29fn indent() -> &'static str {
30    "    "
31}
32
33pub trait Import {
34    fn import(&self) -> HashSet<ModuleRef>;
35}