False positive: F401 'foo' imported but unused a.py: ```python from b import foo def test(): global foo print(foo) foo = 'bar' print(foo) test() ``` b.py: ```python foo = 'foo' ``` Also resolves [this PyCharm Error](https://youtrack.jetbrains.com/issue/PY-12916)