mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-01-09 14:08:03 -05:00
Refactors the `get_package_version` helper function to use the standard `importlib.metadata` library instead of a subprocess call to `pip show`. This change provides several benefits: - Robustness: Avoids brittle parsing of command-line tool output. - Performance: Eliminates the overhead of spawning a new process. - Correctness: The return type hint is corrected to `Optional[str]` to accurately reflect that the function can return `None`. - Simplicity: The unused `python_cmd` parameter has been removed, simplifying the function's signature.