mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-21 04:09:45 +03:00
296308546a
hermes_agent.compat.finder is a meta_path finder that maps an old dotted name to its current one by the longest prefix that is a key of the moves table, and returns the real module object for it. An old name and its current name therefore share state, mock.patch through either name reaches the real code, and reload() re-executes the real file. Keys are only added; when a target moves again only its value changes, so renames chain without loading any file twice. hermes_agent.compat.moves holds the table as plain dicts with no imports, so an older release can read it. It is empty on today's layout. With strict=True the finder refuses an old name and names the current one, for in-repo code that must not depend on the aliases.
2 lines
91 B
Python
2 lines
91 B
Python
"""The Hermes Agent package; today it holds only the module-rename compatibility layer."""
|