PyFunceble/helpers.py
def read(self):
        """
        Read a given file path and return its content.

        :return: The content of the given file path.
        :rtype: str
        """

        try:
            with open(self.file, "r", encoding="utf-8") as file:
                # We open and read a file.

                # We get the file content.
                funilrys = file.read()
        except UnicodeDecodeError:  # pragma: no cover
            with open(self.file, "r") as file:
                # We open and read a file.

                # We get the file content.
                funilrys = file.read()

        # We return the file content.
        return funilrys
def read(self):
        try:
            with open(self.file, "r", encoding="utf-8") as file:
                # We open and read a file.

                # We get the file content.
                funilrys = file.read()
        except UnicodeDecodeError:  # pragma: no cover
            with open(self.file, "r") as file:
                # We open and read a file.

                # We get the file content.
                funilrys = file.read()

        # We return the file content.
        return funilrys
def read ( self ) : try : with open ( self . file , "r" , encoding = "utf-8" ) as file : # We open and read a file. # We get the file content. funilrys = file . read ( ) except UnicodeDecodeError : # pragma: no cover with open ( self . file , "r" ) as file : # We open and read a file. # We get the file content. funilrys = file . read ( ) # We return the file content. return funilrys
Read a given file path and return its content.

        :return: The content of the given file path.
        :rtype: str
Read a given file path and return its content .