tokencrawler/.venv/lib/python3.9/site-packages/websockets/legacy/compatibility.py
2022-03-17 22:16:30 +01:00

13 lines
314 B
Python

from __future__ import annotations
import asyncio
import sys
from typing import Any, Dict
def loop_if_py_lt_38(loop: asyncio.AbstractEventLoop) -> Dict[str, Any]:
"""
Helper for the removal of the loop argument in Python 3.10.
"""
return {"loop": loop} if sys.version_info[:2] < (3, 8) else {}