finds mangled globals and freevars undefined/unused
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
New
|
Undecided
|
Unassigned |
Bug Description
*Please describe how you installed Flake8*
Example:
```
python3 -m venv ~/.virtualenvs/
workon flake8
pip install -U pip setuptools wheel
pip install flake8 flake8-commas
```
*Please provide the exact, unmodified output of `flake8 --bug-report`*
nah
*Please describe the problem or feature*
flake8 thinks that mangled globals or freevars are undefined in:
```python
def _Ham__spam(value):
value + ' yes mangling really works like this'
class Ham:
def foo(self, value):
return __spam(value)
```
*If this is a bug report, please explain with examples (and example code) what you expected to happen and what actually happened.*
I expected __spam to be considered defined, because it is.
This is relevant for someone implementing this https:/ /stackoverflow. com/questions/ 11024344/ python- name-mangling- function