-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
BackportedFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Milestone
Description
Bug description
# pylint: disable=missing-module-docstring,missing-function-docstring
import asyncio
from typing import NoReturn
async def coro() -> NoReturn:
while True:
await asyncio.sleep(1)
async def main() -> None:
asyncio.create_task(coro())
print("hello")
if __name__ == "__main__":
asyncio.run(main())
Configuration
No response
Command used
pylint a.py
Pylint output
************* Module a
a.py:14:4: W0101: Unreachable code (unreachable)
-----------------------------------
Your code has been rated at 9.00/10
Expected behavior
No error
Pylint version
pylint 3.2.6
astroid 3.2.4
Python 3.11.9 (main, Apr 6 2024, 17:59:24) [GCC 9.4.0]
OS / Environment
Ubuntu 20.04.6 LTS
Additional dependencies
No response
Metadata
Metadata
Assignees
Labels
BackportedFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation