
    hK                     P    S SK r S SKJr  S SKJr  S SKJr  S\S\\\4   S\4S jrg)	    N)Path)
ModuleType)Unionnamelocreturnc                     [         R                  R                  U [        U5      5      n[         R                  R	                  U5      nUR
                  R                  U5        U$ )zImport module from a file. Used to load models from a directory.

name (str): Name of module to load.
loc (str / Path): Path to the file.
RETURNS: The loaded module.
)	importlibutilspec_from_file_locationstrmodule_from_specloaderexec_module)r   r   specmodules       M/home/james-whalen/.local/lib/python3.13/site-packages/weasel/util/modules.pyimport_filer      sI     >>11$CAD^^,,T2FKKF#M    )	r
   pathlibr   typesr   typingr   r   r    r   r   <module>r      s4       
c 
c4i 0 
Z 
r   