dry-python / dry-python/returns

Kind of Kind

オープン
#813 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
4.4k
フォーク
155
平均マージ
2時間 27分
マージ済み PR(30日)
22

説明

# Bug report

## What's wrong

I would like to do

```python
from __future__ import annotations

from typing import TypeVar
from returns.primitives.hkt import Kind1, Kind2

class Alphabet:
pass

_A = TypeVar("_A", bound=Alphabet)

class State(Kind1["State", _A]):
pass

_S = TypeVar("_S", bound=State)

class Step(Kind2["Step", _A, _S]):
def foo(self, step: Step[_A, Kind1[_S, _A]]): # mypy error
del step
del self
pass
```

Such that the `step` parameter of `Step.foo` has the type-hint `Step[_A, _S[_A]]`.
kind

## System information

- `python` version: Python 3.9.1
- `returns` version: master:1fec2a8a79175da5afa39695e3ccc177c8c73ab7
- `mypy` version: mypy 0.800

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。