mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 11:20:44 +07:00
[pycharm] PY-79331 render type as "type", not "Type"
IJ-MR-159663 GitOrigin-RevId: e346f761a0c07e6f5897d02f6529ad78a073daa5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5fba2f8e01
commit
57b4491fda
+2
-2
@@ -3,6 +3,6 @@ import my
|
||||
|
||||
def foo(a) -> my.X:
|
||||
if a:
|
||||
return <warning descr="Expected type 'X', got 'Type[X]' instead">my.X<caret></warning>
|
||||
return <warning descr="Expected type 'X', got 'type[X]' instead">my.X<caret></warning>
|
||||
else:
|
||||
return <warning descr="Expected type 'X', got 'Type[Y]' instead">my.Y</warning>
|
||||
return <warning descr="Expected type 'X', got 'type[Y]' instead">my.Y</warning>
|
||||
+1
-3
@@ -1,10 +1,8 @@
|
||||
from typing import Type
|
||||
|
||||
import my
|
||||
from my import X, Y
|
||||
|
||||
|
||||
def foo(a) -> Type[X | Y]:
|
||||
def foo(a) -> type[X | Y]:
|
||||
if a:
|
||||
return my.X<caret>
|
||||
else:
|
||||
|
||||
+2
-2
@@ -3,6 +3,6 @@ import my
|
||||
|
||||
def foo(a) -> my.X:
|
||||
if a:
|
||||
return <warning descr="Expected type 'X', got 'Type[X]' instead">my.X<caret></warning>
|
||||
return <warning descr="Expected type 'X', got 'type[X]' instead">my.X<caret></warning>
|
||||
else:
|
||||
return <warning descr="Expected type 'X', got 'Type[Y]' instead">my.Y</warning>
|
||||
return <warning descr="Expected type 'X', got 'type[Y]' instead">my.Y</warning>
|
||||
+1
-3
@@ -1,10 +1,8 @@
|
||||
from typing import Type
|
||||
|
||||
import my
|
||||
from my import X, Y
|
||||
|
||||
|
||||
def foo(a) -> Type[X | Y]:
|
||||
def foo(a) -> type[X | Y]:
|
||||
if a:
|
||||
return my.X
|
||||
else:
|
||||
|
||||
+2
-2
@@ -5,6 +5,6 @@ import my
|
||||
|
||||
def foo(a) -> my.X:
|
||||
if a:
|
||||
return <warning descr="Expected type 'X', got 'Type[X]' instead">my.X<caret></warning>
|
||||
return <warning descr="Expected type 'X', got 'type[X]' instead">my.X<caret></warning>
|
||||
else:
|
||||
return <warning descr="Expected type 'X', got 'Type[Y]' instead">my.Y</warning>
|
||||
return <warning descr="Expected type 'X', got 'type[Y]' instead">my.Y</warning>
|
||||
+1
-3
@@ -1,12 +1,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Type
|
||||
|
||||
import my
|
||||
from my import X, Y
|
||||
|
||||
|
||||
def foo(a) -> Type[X | Y]:
|
||||
def foo(a) -> type[X | Y]:
|
||||
if a:
|
||||
return my.X
|
||||
else:
|
||||
|
||||
+2
-2
@@ -3,6 +3,6 @@ import my
|
||||
|
||||
def foo(a) -> my.X:
|
||||
if a:
|
||||
return <warning descr="Expected type 'X', got 'Type[X]' instead">my.X<caret></warning>
|
||||
return <warning descr="Expected type 'X', got 'type[X]' instead">my.X<caret></warning>
|
||||
else:
|
||||
return <warning descr="Expected type 'X', got 'Type[Y]' instead">my.Y</warning>
|
||||
return <warning descr="Expected type 'X', got 'type[Y]' instead">my.Y</warning>
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
from typing import Union, Type
|
||||
from typing import Union
|
||||
|
||||
import my
|
||||
from my import X, Y
|
||||
|
||||
|
||||
def foo(a) -> Type[Union[X, Y]]:
|
||||
def foo(a) -> type[Union[X, Y]]:
|
||||
if a:
|
||||
return my.X
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user