MCPcopy Index your code
hub / github.com/Nuitka/Nuitka / __init__

Method __init__

nuitka/nodes/ModuleNodes.py:1034–1071  ·  view source on GitHub ↗
(
        self,
        module_name,
        module_filename,
        reason,
        technical,
        source_ref,
    )

Source from the content-addressed store, hash-verified

1032 avoid_duplicates = set()
1033
1034 def __init__(
1035 self,
1036 module_name,
1037 module_filename,
1038 reason,
1039 technical,
1040 source_ref,
1041 ):
1042 PythonModuleBase.__init__(
1043 self,
1044 module_name=module_name,
1045 reason=reason,
1046 source_ref=source_ref,
1047 )
1048
1049 # That would be a mistake we just made.
1050 assert os.path.basename(source_ref.getFilename()) != "<frozen>"
1051
1052 # That is too likely a bug.
1053 assert module_name != "__main__"
1054
1055 # Duplicates should be avoided by us caching elsewhere before creating
1056 # the object.
1057 assert self.getFullName() not in self.avoid_duplicates, self.getFullName()
1058 self.avoid_duplicates.add(self.getFullName())
1059
1060 # Required to startup
1061 self.technical = technical
1062
1063 self.used_modules = None
1064
1065 if os.path.isdir(module_filename):
1066 module_filename = getPackageDirFilename(module_filename)
1067 self.is_package = True
1068 else:
1069 self.is_package = False
1070
1071 self.module_filename = module_filename
1072
1073 def isExtensionModulePackage(self):
1074 return self.is_package

Callers

nothing calls this directly

Calls 5

getPackageDirFilenameFunction · 0.90
getFullNameMethod · 0.80
__init__Method · 0.45
getFilenameMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected