0
import pep8

s = """
def a:
    pass

def b:
   pass

"""

pep8.StyleGuide().is_such_method_exists_for_string_?(s)

// and then, get out put as list ?

Tim
  • 41,901
  • 18
  • 127
  • 145
miR172
  • 3
  • 1

1 Answers1

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()
Christian Berendt
  • 3,416
  • 2
  • 13
  • 22