Newer
Older
"""
Fix autogenerated py files to contain header information.
Writes to the file in-place
"""
from io import open
def lines_to_pre_append():
lines = list()
# PYLINT ingnore flags
lines.append(u"#pylint: skip-file\n")
return lines
def main(argv):
"""
Main entry point
Args:
argv (list): List of strings giving command line arguments The full absolulte path to the file to wrap is mandatory.
"""
argv.reverse()
to_wrap = argv[0]
if not os.path.exists(to_wrap):
raise ValueError("%s : Does not exist." % to_wrap)
with open(to_wrap, "r+", encoding="UTF-8") as f: