def eval(self, keys):
        """
        Examples:
            Specify type literal for key.

            >>> env.eval({MAIL_PORT: int})
        """
        for k, v in keys.items():
            if k in self.app.config:
                try:
                    val = ast.literal_eval(self.app.config[k])
                    if type(val) == v:
                        if self.verbose_mode:
                            print(
                                " * Casting a specified var as literal:"
                                " {0} => {1}".format(k, v)
                            )
                        self.app.config[k] = val
                    else:
                        print(
                            " ! Does not match with specified type:"
                            " {0} => {1}".format(k, v))
                except (__HOLE__, SyntaxError):
                    print(" ! Could not evaluate as literal type:"
                          " {0} => {1}".format(k, v))
dataset/ETHPy150Open grauwoelfchen/flask-dotenv/flask_dotenv.py/DotEnv.eval