-
Notifications
You must be signed in to change notification settings - Fork 19
Use PyO3's declarative modules #249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Implement the Python `clone` method as a wrapper around the derived `clone`.
e003f69 to
e3765cb
Compare
CodSpeed Instrumentation Performance ReportMerging #249 will degrade performances by 15.63%Comparing Summary
Benchmarks breakdown
|
seddonym
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great changes, thanks so much.
| m.add("ParseError", py.get_type::<ParseError>())?; | ||
| m.add("CorruptCache", py.get_type::<CorruptCache>())?; | ||
| Ok(()) | ||
| mod _rustgrimp { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been meaning to do this for a while, thanks!
| .ok_or(GrimpError::ModuleNotPresent(name.to_owned())) | ||
| } | ||
|
|
||
| fn parse_containers( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't realise there were two impl blocks! Thanks.
| /// | ||
| /// Returns dict[Module, set[DirectImport]]. | ||
| #[pyfunction] | ||
| pub fn scan_for_imports<'py>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Originally the design was to have lib.rs as the Python layer but as you will have noticed, we are no longer sticking to that as the crate has grown.
Also refactor
GraphWrapperand movescan_for_importsinto theimport_scanningmodule.