Ale*_*kov 7 python ide syntax code-inspection pycharm
我在PyCharm Community Edition 2017.2中打开的Python模块中有这段代码。
class Sample(object):
def __init__(self):
self.prop1 = 5
self.prop2 = 10
def method1(self):
return foo
def do_work(self):
not_defined_func()
s = Sample()
s.method1()
bar = call_func
Run Code Online (Sandbox Code Playgroud)
对于某些相当严重的问题,IDE不会发出任何警告:
foo尚未定义。call_func变量bar。not_defined_func在方法内部调用了未定义的函数do_work。如何启用PyCharm突出显示这些内容?我重新安装了PyCharm,并在中Inspections启用了所有功能File > Settings > Editor > Inspections > Python。