1
PyCharm Community Edition 2017.2에서 열리는 Python 모듈에서이 코드를 가지고 있습니다.PyCharm Community 2017.2의 정의되지 않은 변수에 경고가 없습니다.
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
IDE는 몇 가지 매우 심각한 문제에 대한 경고를 제공하지 않습니다 : 반환 변수 foo
가
- 정의되지 않았습니다.
- 정의되지 않은 변수
call_func
을 변수bar
에 지정합니다. do_work
메서드 내에not_defined_func
정의 함수가 정의되어 있지 않습니다.
어떻게 이러한 것들을 강조 표시하려면 PyCharm을 활성화해야합니까? PyCharm을 새로 설치했으며 Inspections
을 File > Settings > Editor > Inspections > Python
에서 사용하도록 설정했습니다.