summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/third_party/websockets/src/websockets/legacy/compatibility.py
blob: df81de9dbcead50479ec645c4625cadca01f3efc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 {}