Commits
Click on a commit to change the comparison rangeRemove eprint! statements
Pretty sure these were just added for debugging. Simplify write method by chaining operations
Combine File::create() and write_all() into a single chained expression
without intermediate variables, and use map_err for error conversion.
This results in more concise and idiomatic Rust code.
Addresses PR comment: https://github.com/python-grimp/grimp/pull/259#discussion_r2486635845
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com> Implement FromPyObject for ImportsByModule
Replace the imports_by_module_to_rust helper function with a more idiomatic
Rust approach by implementing FromPyObject trait for an ImportsByModule
newtype wrapper. This allows using .extract() directly, making the code
more ergonomic and following Rust best practices similar to DirectImport.
The new ImportsByModule wrapper encapsulates HashMap<Module, HashSet<DirectImport>>
and provides automatic conversion from Python dict objects.
Addresses PR comment: https://github.com/python-grimp/grimp/pull/259#discussion_r2486413276
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com> Make internal types and functions private
Make implementation details private to reduce the public API surface:
In filesystem.rs:
- RealBasicFileSystem and FakeBasicFileSystem structs
- Their inner fields
- parse_indented_file_system_string function
In import_scanning.rs:
- py_found_packages_to_rust function
- get_modules_from_found_packages function
- scan_for_imports_no_py function
- to_py_direct_imports function
Only the Python-facing wrapper structs (PyRealBasicFileSystem,
PyFakeBasicFileSystem) and the exported Python functions remain public.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>