0
import pep8

s = """
def a:
    pass

def b:
   pass

"""

pep8.StyleGuide().is_such_method_exists_for_string_?(s)

// 然后,作为列表输出?

4

1 回答 1

1
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()
于 2014-06-19T19:22:00.393 回答