PyCharm - 超类成员的“未解析的属性引用”

时间:2018-04-30 04:03:18

标签: python python-3.x pycharm

此代码运行完全正常,但PyCharm无法解析Timer超类的属性。为什么? 设置了Python 3.6解释器。

from threading import Timer, Event

class TestStatsCollector(Timer):
    def __init__(self, func, interval=60):
        super().__init__(interval, func)

    def run(self):
        while not self.finished.is_set():
            self.finished.wait(self.interval)
            self.function(*self.args, **self.kwargs)

0 个答案:

没有答案
相关问题