7e71cfc468aa49d9dc59d703a61e4f1a28ac380d,PyInstaller/lib/modulegraph/modulegraph.py,ModuleGraph,_find_module_path,#ModuleGraph#Any#Any#Any#,2964

Before Change


                // Else, this is either a module or C extension.
                else:
                    // In either case, this path must have a filetype.
                    filetype = os.path.splitext(pathname)[1]
                    if not filetype:
                        raise ImportError(
                            "Non-package module %r path %r has no filetype" % (module_name, pathname))

After Change


                    // In either case, this path must have a filetype.
                    // os.path.splitext won"t work here since we sometimes need
                    // to match more than just the file extension.
                    filetype = [filetype
                                for filetype in _IMPORTABLE_FILETYPE_EXTS
                                if pathname.endswith(filetype)]
                    if filetype:
                        // at least one extension matched,
                        // pick the first (longest) one
                        filetype = filetype[0]
                    else:
                        raise ImportError(
                            "Non-package module %r path %r has no filetype" % (module_name, pathname))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pyinstaller/pyinstaller
Commit Name: 7e71cfc468aa49d9dc59d703a61e4f1a28ac380d
Time: 2019-11-08
Author: springermac@gmail.com
File Name: PyInstaller/lib/modulegraph/modulegraph.py
Class Name: ModuleGraph
Method Name: _find_module_path


Project Name: nipy/dipy
Commit Name: 749855e9d1b5bd1aa7b46db144503922fbc0a336
Time: 2013-08-06
Author: matthieu.dumont@usherbrooke.ca
File Name: doc/examples/brain_extraction_dwi.py
Class Name:
Method Name:


Project Name: EducationalTestingService/skll
Commit Name: 140f9765f4c4f5165fd546bea30b2c473b9abb10
Time: 2014-11-07
Author: dblanchard@ets.org
File Name: skll/utilities/join_features.py
Class Name:
Method Name: main