7a7eb11a7bed7024831694f973c3f2cf30fd359e,PyInstaller/depend/imphook.py,ModuleHook,_load_hook_module,#ModuleHook#,360

Before Change


        

        // If this hook script module has already been loaded, noop.
        if self._hook_module is not None:
            return

        // Load and execute the hook script. Even if mechanisms from the import
        // machinery are used, this does not import the hook as the module.
        head, tail = os.path.split(self.hook_filename)
        logger.info(
            "Loading module hook %r from %r...", tail, head)
        self._hook_module = importlib_load_source(

After Change



        // If this hook script module has already been loaded,
        // or we are _shallow, noop.
        if self._hook_module is not None or self._shallow:
            if self._shallow:
                self._hook_module = True  // Not None
                // Inform the user
                logger.debug(
                    "Skipping module hook %r from %r because a hook for %s has"
                    " already been loaded.",
                    *os.path.split(self.hook_filename)[::-1], self.module_name
                )
                // Set the default attributes to empty instances of the type.
                for attr_name, \
                        (attr_type, _) in _MAGIC_MODULE_HOOK_ATTRS.items():
                    super(ModuleHook, self).__setattr__(attr_name, attr_type())
            return

        // Load and execute the hook script. Even if mechanisms from the import
        // machinery are used, this does not import the hook as the module.
        head, tail = os.path.split(self.hook_filename)
        logger.info(
            "Loading module hook %r from %r...", tail, head)
        self._hook_module = importlib_load_source(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pyinstaller/pyinstaller
Commit Name: 7a7eb11a7bed7024831694f973c3f2cf30fd359e
Time: 2020-07-01
Author: 50370070+Legorooj@users.noreply.github.com
File Name: PyInstaller/depend/imphook.py
Class Name: ModuleHook
Method Name: _load_hook_module


Project Name: GPflow/GPflowOpt
Commit Name: 0301ffaa163f037bf999ea93522ba9d054e0f0c9
Time: 2017-08-13
Author: joachim.vanderherten@ugent.be
File Name: GPflowOpt/models.py
Class Name: ModelWrapper
Method Name: __setattr__


Project Name: GPflow/GPflow
Commit Name: f448c24dc7b096a2041b699ce1bcb72cf287144b
Time: 2017-08-29
Author: art.art.v@gmail.com
File Name: GPflow/param.py
Class Name: Param
Method Name: _set_fixed