我可以让python中的pep8解析字符串而不是文件吗?

2024-06-12 05:58:04 发布

您现在位置:Python中文网/ 问答频道 /正文

import pep8

s = """
def a:
    pass

def b:
   pass

"""

pep8.StyleGuide().is_such_method_exists_for_string_?(s)

//然后,作为列表输出?你知道吗


Tags: import列表forstringisdefexistspass