Why does pycharm propose to change method to static

前端 未结 9 1588
面向向阳花
面向向阳花 2020-12-22 18:41

The new pycharm release (3.1.3 community edition) proposes to convert the methods that don\'t work with the current object\'s state to static.

9条回答
  •  佛祖请我去吃肉
    2020-12-22 19:06

    This error message just helped me a bunch, as I hadn't realized that I'd accidentally written my function using my testing example player

    my_player.attributes[item] 
    

    instead of the correct way

    self.attributes[item]
    

提交回复
热议问题