style: flake8 stuff
Anirudh icyph0x@pm.me
Sun, 15 Apr 2018 22:09:06 +0530
M
make.py
→
make.py
@@ -64,7 +64,7 @@ os.mkdir(html_file)
output = jinja_render(html_text, TEMPL_FILE) with open(os.path.join(html_file, 'index.html'), 'w') as f: f.write(output) - print(run('Rendered %s.' % (page))) + print(run('Rendered %s.' % (page))) def server():@@ -81,6 +81,7 @@ print(info('Stopping server.'))
httpd.server_close() sys.exit(1) + def main(): if args.serve: server()@@ -91,10 +92,10 @@ print(info(italic('pages') + ' directory is empty. Nothing to build.'))
sys.exit(1) else: try: - html_gen() - print(good('Done in %0.5fs.' % (time.process_time() - start))) + html_gen() + print(good('Done in %0.5fs.' % (time.process_time() - start))) except jinja2.exceptions.TemplateNotFound: - print(bad('Error: specified template not found: %s' % (TEMPL_FILE))) + print(bad('Error: specified template not found: %s' % TEMPL_FILE)) if __name__ == "__main__":
M
vite.py
→
vite.py
@@ -45,7 +45,6 @@ except FileExistsError:
print(bad('Error: specified path exists.')) - def create_config(path): with open(path + '/config.py', 'w') as f: f.write("""# config.py - Vite's configuration script@@ -85,6 +84,7 @@
def main(): if args.new: create_project(project_path) + if __name__ == "__main__": main()