diff --git a/pyproject.toml b/pyproject.toml index dcfb2a4..bc2bd43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "mrpy-nvim" version = "0.1.0" description = "Add your description here" readme = "README.md" -requires-python = ">=3.12" +requires-python = ">=3.11" dependencies = [ "pynvim~=0.6.0", "requests>=2.32.5", diff --git a/rplugin/python3/mrpy/hints.py b/rplugin/python3/mrpy/hints.py index 25c18f3..84ec821 100644 --- a/rplugin/python3/mrpy/hints.py +++ b/rplugin/python3/mrpy/hints.py @@ -1,4 +1,8 @@ -type JSONDataScalar = str | None | float | bool -type JSONDataList = list[JSONDataScalar | "JSONDataMap" | "JSONDataList"] -type JSONDataMap = dict[str, JSONDataScalar | JSONDataList | "JSONDataMap"] -type JSONData = JSONDataMap | JSONDataList +from __future__ import annotations +from typing import TypeAlias + + +JSONDataScalar: TypeAlias = str | None | float | bool +JSONDataList: TypeAlias = list[JSONDataScalar | "JSONDataMap" | "JSONDataList"] +JSONDataMap: TypeAlias = dict[str, JSONDataScalar | JSONDataList | "JSONDataMap"] +JSONData: TypeAlias = JSONDataMap | JSONDataList