forked from pool/python-trio-typing
Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| b1f28936b4 | |||
|
|
c967706ac6 |
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 30 09:19:13 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
|
||||||
|
|
||||||
|
- add patch support-mypy-1.11.patch so we can support this package
|
||||||
|
until all software moved to the newer trio
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Mar 25 07:51:35 UTC 2024 - Richard Rahl <rrahl0@proton.me>
|
Mon Mar 25 07:51:35 UTC 2024 - Richard Rahl <rrahl0@proton.me>
|
||||||
|
|
||||||
|
|||||||
@@ -21,19 +21,21 @@ Name: python-trio-typing
|
|||||||
Version: 0.10.0
|
Version: 0.10.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Static type checking support for Trio and related projects
|
Summary: Static type checking support for Trio and related projects
|
||||||
License: MIT OR Apache-2.0
|
License: Apache-2.0 OR MIT
|
||||||
URL: https://github.com/python-trio/trio-typing
|
URL: https://github.com/python-trio/trio-typing
|
||||||
Source: https://files.pythonhosted.org/packages/source/t/trio-typing/trio-typing-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/t/trio-typing/trio-typing-%{version}.tar.gz
|
||||||
BuildRequires: python-rpm-macros
|
## https://github.com/python-trio/trio-typing/pull/97
|
||||||
|
Patch0: support-mypy-1.11.patch
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module mypy}
|
|
||||||
BuildRequires: %{python_module async_generator}
|
BuildRequires: %{python_module async_generator}
|
||||||
BuildRequires: %{python_module importlib-metadata}
|
BuildRequires: %{python_module importlib-metadata}
|
||||||
BuildRequires: %{python_module mypy_extensions >= 0.4.2}
|
BuildRequires: %{python_module mypy_extensions >= 0.4.2}
|
||||||
|
BuildRequires: %{python_module mypy}
|
||||||
BuildRequires: %{python_module packaging}
|
BuildRequires: %{python_module packaging}
|
||||||
BuildRequires: %{python_module trio >= 0.16.0}
|
BuildRequires: %{python_module trio >= 0.16.0}
|
||||||
BuildRequires: %{python_module typing_extensions >= 3.7.4}
|
BuildRequires: %{python_module typing_extensions >= 3.7.4}
|
||||||
|
|||||||
52
support-mypy-1.11.patch
Normal file
52
support-mypy-1.11.patch
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
From 5e00c376a93fa5a1b0213ae1f9d7cc3f717bb922 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Redoubts <Redoubts@users.noreply.github.com>
|
||||||
|
Date: Wed, 25 Sep 2024 21:21:33 -0400
|
||||||
|
Subject: [PATCH] Update plugin.py
|
||||||
|
|
||||||
|
Use TypeVarId for mypy 1.11
|
||||||
|
Don't use is_noreturn
|
||||||
|
---
|
||||||
|
trio_typing/plugin.py | 9 ++++-----
|
||||||
|
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/trio_typing/plugin.py b/trio_typing/plugin.py
|
||||||
|
index 31f4887..76ccbbf 100644
|
||||||
|
--- a/trio_typing/plugin.py
|
||||||
|
+++ b/trio_typing/plugin.py
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
Overloaded,
|
||||||
|
TypeVarLikeType,
|
||||||
|
TypeVarType,
|
||||||
|
+ TypeVarId,
|
||||||
|
Instance,
|
||||||
|
UnionType,
|
||||||
|
UninhabitedType,
|
||||||
|
@@ -134,9 +135,7 @@ def decode_agen_types_from_return_type(
|
||||||
|
return (
|
||||||
|
yield_type,
|
||||||
|
send_type,
|
||||||
|
- UninhabitedType(
|
||||||
|
- is_noreturn=True, line=ctx.context.line, column=ctx.context.column
|
||||||
|
- ),
|
||||||
|
+ UninhabitedType(line=ctx.context.line, column=ctx.context.column),
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
return (
|
||||||
|
@@ -464,7 +463,7 @@ def start_soon(
|
||||||
|
TypeVarType(
|
||||||
|
"__T{}".format(arg_idx),
|
||||||
|
"__T{}".format(arg_idx),
|
||||||
|
- -len(fn_type.variables) - arg_idx - 1,
|
||||||
|
+ TypeVarId(-len(fn_type.variables) - arg_idx - 1),
|
||||||
|
[],
|
||||||
|
ctx.api.named_generic_type("builtins.object", []),
|
||||||
|
line=ctx.context.line,
|
||||||
|
@@ -477,7 +476,7 @@ def start_soon(
|
||||||
|
TypeVarType(
|
||||||
|
"__T{}".format(arg_idx),
|
||||||
|
"__T{}".format(arg_idx),
|
||||||
|
- -len(fn_type.variables) - arg_idx - 1,
|
||||||
|
+ TypeVarId(-len(fn_type.variables) - arg_idx - 1),
|
||||||
|
[],
|
||||||
|
ctx.api.named_generic_type("builtins.object", []),
|
||||||
|
line=ctx.context.line,
|
||||||
Reference in New Issue
Block a user