PY-53120 "Add method" action does not create async def

GitOrigin-RevId: 8b2286a3f50d7b0d00ebbb0befc9811a80f7b304
This commit is contained in:
Petr Golubev
2024-01-19 20:06:59 +00:00
committed by intellij-monorepo-bot
parent d58497020b
commit 05484d8f97
6 changed files with 61 additions and 6 deletions
@@ -0,0 +1,7 @@
class A:
def __init__(self):
self.x = 1
async def f():
a = A()
await a.<caret><warning descr="Unresolved attribute reference 'y' for class 'A'">y</warning>()
@@ -0,0 +1,11 @@
class A:
def __init__(self):
self.x = 1
async def y(self):
pass
async def f():
a = A()
await a.y()
@@ -0,0 +1,11 @@
class A:
def __init__(self):
self.x = 1
async def foo(self, a):
await self.<caret><warning descr="Unresolved attribute reference 'y' for class 'A'">y</warning>(1, a)
# Some comment
class B:
pass
@@ -0,0 +1,15 @@
class A:
def __init__(self):
self.x = 1
async def foo(self, a):
await self.y(1, a)
async def y(self, param, a):
pass
# Some comment
class B:
pass