dry-python / dry-python/returns

Kind of Kind

Ouverte
#813 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Python
Étoiles
4.4k
Forks
155
Merge moyen
2 h 27 min
PR mergées (30 j)
22

Description

# 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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.