MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / import_module_from_path

Function import_module_from_path

web/pgadmin/evaluate_config.py:33–40  ·  view source on GitHub ↗
(module_name, file_path)

Source from the content-addressed store, hash-verified

31
32# Function to load config_distro at custom path
33def import_module_from_path(module_name, file_path):
34 # Create a module spec
35 spec = importlib.util.spec_from_file_location(module_name, file_path)
36 # Create the module based on the spec
37 module = importlib.util.module_from_spec(spec)
38 # Execute the module (this loads it)
39 spec.loader.exec_module(module)
40 return module
41
42
43def validate_config_variable(key, value):

Callers 1

evaluate_config.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected