Wednesday, 15 April 2015

format - Can I ask pep8 in python to parse a string instead of a file? -



format - Can I ask pep8 in python to parse a string instead of a file? -

import pep8 s = """ def a: pass def b: pass """ pep8.styleguide().is_such_method_exists_for_string_?(s)

// , then, out set list ?

import pep8 lines = """ def a: pass def b: pass """ checker = pep8.checker( lines=lines.strip().splitlines(), filename=none, show_source=true ) result = checker.check_all()

python format pep8 pep8-checker

No comments:

Post a Comment