Closed
Description
Steps to reproduce
pylint_example.py:
class Class:
pass
pylint_example2.py:
from pylint_example import Class
class Class2:
cls: 'Class'
pylint pylint_example2.py
************* Module pylint_example2
pylint_example2.py:4:0: R0903: Too few public methods (0/2) (too-few-public-methods)
pylint_example2.py:1:0: W0611: Unused Class imported from pylint_example (unused-import)
------------------------------------------------------------------
Your code has been rated at 3.33/10 (previous run: 3.33/10, +0.00)
Current behavior
String literal in type annotation is considered "unused" and warning is emitted.
Expected behavior
There should not be any warning about unused import.
pylint --version output
pylint 2.4.4
astroid 2.3.3
Python 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0]