Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed May 31, 2024
1 parent 39d10a9 commit 66158fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ enable_error_code =
narrowed-type-not-subtype
strict = True

[mypy-aiohttp_socks.*]
[mypy-aiohttp_socks.*,winloop.*]
ignore_missing_imports = True
6 changes: 3 additions & 3 deletions nitro_generator_checker/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ def async_run(main: Coroutine[Any, Any, T]) -> T:
pass
else:
if hasattr(uvloop, "run"):
return uvloop.run(main) # type: ignore[no-any-return]
return uvloop.run(main) # type: ignore[no-any-return, unused-ignore]
uvloop.install()
return asyncio.run(main)

try:
import winloop # type: ignore[import-not-found, import-untyped, unused-ignore] # noqa: PLC0415
import winloop # type: ignore[import-not-found, unused-ignore] # noqa: PLC0415
except ImportError:
pass
else:
if hasattr(winloop, "run"):
return winloop.run(main) # type: ignore[no-any-return]
return winloop.run(main) # type: ignore[no-any-return, unused-ignore]
winloop.install()
return asyncio.run(main)
if sys.platform == "win32":
Expand Down

0 comments on commit 66158fb

Please sign in to comment.