pylint-dev / pylint

It's not just a linter that annoys you!
https://pylint.readthedocs.io/en/latest/
GNU General Public License v2.0
5.18k stars 1.1k forks source link

PEP 695: Type Parameter Syntax #9726

Closed Yamahari closed 2 weeks ago

Yamahari commented 2 weeks ago

Bug description

# pylint: disable=C0304,C0114,C0115,R0903
class GenericClass[T]:
    def __init__(self, x: T) -> None:
        pass

Configuration

No response

Command used

pylint src\testtyping\typing.py

Pylint output

************* Module testtyping.typing
src\testtyping\typing.py:3:26: E0602: Undefined variable 'T' (undefined-variable)

Expected behavior

No Error

Pylint version

pylint 3.2.3
astroid 3.2.2
Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun  6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)]

OS / Environment

Windows 10 Enterprise 22H2

Additional dependencies

No response

mbyrnepr2 commented 2 weeks ago

Thanks. Looks like a duplicate of https://github.com/pylint-dev/pylint/issues/9335