pyo3_stub_gen/
generate.rs

1//! Generate Python typing stub file a.k.a. `*.pyi` file.
2
3mod arg;
4mod class;
5mod deprecated;
6mod docstring;
7mod enum_;
8mod function;
9mod member;
10mod method;
11mod module;
12mod stub_info;
13mod variable;
14mod variant_methods;
15
16pub use arg::*;
17pub use class::*;
18pub use enum_::*;
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}