Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os
import copy
import cssbeautifier
options = cssbeautifier.default_options()
options.wrap_line_length = 80
data = ''
def beautifier_test_github_css():
cssbeautifier.beautify(data, options)
def report_perf(fn):
import timeit
iter = 5
time = timeit.timeit(
fn +
"()",
setup="from __main__ import " +
fn +
def beautifier_test_github_css():
cssbeautifier.beautify(data, options)
def default_options():
return BeautifierOptions()
def default_options():
return BeautifierOptions()
def default_options():
return BeautifierOptions()
def beautify(string, opts=default_options()):
b = Beautifier(string, opts)
return b.beautify()
def beautify_file(file_name, opts=default_options()):
if file_name == '-': # stdin
stream = sys.stdin
else:
stream = open(file_name)
content = ''.join(stream.readlines())
b = Beautifier(content, opts)
return b.beautify()
def beautify_file(file_name, opts=default_options()):
if file_name == '-': # stdin
try:
if sys.stdin.isatty():
raise Exception()
stream = sys.stdin
except Exception:
print("Must pipe input or define input file.\n", file=sys.stderr)
usage(sys.stderr)
raise Exception()
else:
stream = open(file_name)
content = ''.join(stream.readlines())
b = Beautifier(content, opts)
return b.beautify()
def beautify_file(file_name, opts=default_options()):
if file_name == '-': # stdin
stream = sys.stdin
else:
stream = open(file_name)
content = ''.join(stream.readlines())
b = Beautifier(content, opts)
return b.beautify()
def beautify(string, opts=default_options()):
b = Beautifier(string, opts)
return b.beautify()