void () { runWithLanguageLevel( LanguageLevel.PYTHON36, () -> doTestByText(""" from typing_extensions import Final class A: def __init__(self): self.a: Final[str] = "str" def method(self): <warning descr="'Final' attribute should be declared in class body or '__init__'">self.a</warning>: Final[int] = 10 <warning descr="'Final' attribute should be declared in class body or '__init__'">self.b</warning>: Final[int] = 10""") ); }