mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 17:15:38 +07:00
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Depending how the `Task` type actually resolves, Pycharm might see different qualified names. In CPython, the concrete implementation of Task lives in the C accelerator module _asyncio (a binary module). The pure-Python asyncio.tasks.Task is effectively an alias to that implementation. PyCharm builds “binary skeletons” for extension modules. When type inference resolves the class coming from your interpreter’s standard library, it often prefers those skeletons. As a result, the qualified name for Task is taken from the binary module where it’s actually defined: _asyncio.Task. Typeshed stubs reflect this too (depending on Python version). They define/alias Task so that asyncio.tasks.Task, asyncio.Task, and _asyncio.Task can all refer to the same runtime class. Which one PyCharm reports as typeQName depends on how resolution landed: through the binary skeleton (_asyncio) vs the re-exported names in the asyncio package. GitOrigin-RevId: ce6c27e33748a2b1a1b1ba725bccf3c44eaad782
10 lines
108 B
Python
10 lines
108 B
Python
import asyncio
|
|
|
|
|
|
async def do() -> None:
|
|
pass
|
|
|
|
|
|
async def test() -> None:
|
|
asyncio.create_task(do())
|