pyo3_stub_gen/
generate.rs

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