def _find_package(self, root_package):
        """Finds package name of file

        :param root_package: root package
        :return: package name
        """

        package = self.path.replace(root_package, "")
        if package.endswith(".py"):
            package = package[:-3]

        package = package.replace(os.path.sep, MODULE_SEP)
        root_package = get_folder_name(root_package)

        package = root_package + package  # add root
        return package
def _find_package ( self , root_package ) : package = self . path . replace ( root_package , "" ) if package . endswith ( ".py" ) : package = package [ : - 3 ] package = package . replace ( os . path . sep , MODULE_SEP ) root_package = get_folder_name ( root_package ) package = root_package + package return package
Finds package name of file

        :param root_package: root package
        :return: package name