Steps to reproduce
- Create the following file named
pylint_chainmap.py:
import typing
from collections import ChainMap
def check_pylint_chain_map() -> typing.ChainMap[str, typing.Any]:
return ChainMap({"answer": 42})
pylint --reports=n --score=n --disable=C0111 pylint_chainmap.py
Please note that mypy is perfectly happy with this source file.
Current behavior
************* Module pylint_chainmap
pylint_chainmap.py:5:32: E1136: Value 'typing.ChainMap' is unsubscriptable (unsubscriptable-object)
Expected behavior
pylint --version output
pylint 2.3.1
astroid 2.2.5
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)]