From ce89358301994df61737d14cefe4cb247744a4fb Mon Sep 17 00:00:00 2001 From: AcerecA Date: Wed, 7 Jan 2026 08:20:27 +0100 Subject: [PATCH] make compatible with 3.11 --- pyproject.toml | 2 +- rplugin/python3/mrpy/hints.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) 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..a050a33 100644 --- a/rplugin/python3/mrpy/hints.py +++ b/rplugin/python3/mrpy/hints.py @@ -1,4 +1,7 @@ -type JSONDataScalar = str | None | float | bool -type JSONDataList = list[JSONDataScalar | "JSONDataMap" | "JSONDataList"] -type JSONDataMap = dict[str, JSONDataScalar | JSONDataList | "JSONDataMap"] -type JSONData = JSONDataMap | JSONDataList +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