projects
/
power-instruction-analyzer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6061bf
)
add correct __all__ to module
author
Jacob Lifshay
<programmerjake@gmail.com>
Wed, 1 Sep 2021 02:59:41 +0000
(19:59 -0700)
committer
Jacob Lifshay
<programmerjake@gmail.com>
Wed, 1 Sep 2021 02:59:41 +0000
(19:59 -0700)
src/python.rs
patch
|
blob
|
history
diff --git
a/src/python.rs
b/src/python.rs
index b12af3c691fbc3c6bc0aad26ce160a8972702048..452ae0e42c211bafff924b3c3a3ba1d49377fe2b 100644
(file)
--- a/
src/python.rs
+++ b/
src/python.rs
@@
-424,5
+424,15
@@
fn power_instruction_analyzer(_py: Python, m: &PyModule) -> PyResult<()> {
)?;
wrap_all_instr_fns!(m);
+
+ let mut all = Vec::new();
+ for (k, _) in m.dict() {
+ let k = k.extract::<String>()?;
+ if !k.starts_with('_') {
+ all.push(k);
+ }
+ }
+ m.setattr("__all__", all)?;
+
Ok(())
}