ide-python
ide-python copied to clipboard
pyflakes doesn't detect unused instance variables
Atom: 1.41.0 Electron: 4.2.7 Chrome: 69.0.3497.128 Node: v10.11.0 atom-ide-ui: 0.13.0 ide-python: 1.5.0 python-language-server: 0.31.0 pyflakes: 2.1.1
This is detected as unused:
test = ""
This not -.-
self.test = ""
Is it possible that test really never used?) Please provide the whole file.
Hey Anton,
here’s the shortest example i could find: testfile.py:
# -*- Mode: Python; coding: utf-8 -*-
class TestClass():
def init(self):
test = ""
self.test = ""
The variable is unused. Because there is no other function in the initialization function or the calculation uses that variable, especially that variable is not used by self.
Translated by Google Translator
I didn't test but this may be a pyflakes bug.
@lenlen I don't understand what you mean, can you describe it in more detail?