Skip to content

Commit

Permalink
Plumb in get_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
seddonym committed Oct 4, 2024
1 parent c0ff6ea commit 24918d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ impl GraphWrapper {
}
}

pub fn get_modules(&self) -> HashSet<String> {
self._graph.get_modules().iter().map(
|module| module.name.clone()
).collect()
}

#[allow(unused_variables)]
#[pyo3(signature = (module, is_squashed = false))]
pub fn add_module(&mut self, module: &str, is_squashed: bool) {
Expand Down
1 change: 1 addition & 0 deletions src/grimp/adaptors/rustgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __init__(self) -> None:

@property
def modules(self) -> Set[str]:
self._rustgraph.get_modules()
return super().modules

def add_module(self, module: str, is_squashed: bool = False) -> None:
Expand Down

0 comments on commit 24918d4

Please sign in to comment.