'Tidy a file.
:param path: Path of the input file.
:param output: Path of the output file. If not given, output is
returned.
Use :func:`inplace` to tidy files in-place.'

def file(self, path, output=None):

    data = self._parse_data(path)
    with self._get_writer(path, output) as writer:
        self._save_file(data, writer)
        if (not output):
            return writer.getvalue().replace('\r\n', '\n')
