-
```py
from typing import TypeAlias
Values: TypeAlias = dict[str, int]
a = Values(foo="") # no error
```
[playground](https://mypy-play.net/?mypy=master&python=3.10&flags=show-error-codes%2Ca…
-
I'm using the amazing `wrapt.synchronized` decorator, but I've just realized that it breaks the typing signature of the wrapped function (using vscode).
I tested it with custom `wrapt.decorator` fun…
-
-
### Current Tensorclass interface
To define a Tensorclass, we could write:
```python
@tensorclass
class MyTensorclass:
foo: Tensor
bar: Tensor
```
The `@tensorclass` decorator then gen…
-
## Background
With Source Typed, it is now possible to teach strong typing at an introductory level. Naturally, it extends to modules, something that students interact with a lot in Source Academy.…
-
```py
from contextlib import contextmanager
from typing import Iterator
@contextmanager
def foo() -> Iterator[None]:
yield
class Bar:
@property
def asdf(self) -> int:
…
-
### Initial Checks
- [X] I have searched Google & GitHub for similar requests and couldn't find anything
- [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think this f…
-
### Initial Checks
- [X] I have searched Google & GitHub for similar requests and couldn't find anything
- [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think this f…
-
The ruff rule`ARG003: unused-class-method-argument` does not seem to understand that unused arguments sometimes are necessary in order to implement a protocol. See example below:
```py
from abc im…
-
From recent discussions with @prjemian, @tacaswell, @klauer and months-old discussions with @teddyrendahl and @ZLLentz:
After years of due caution, it seems we might be ready to pull the trigger on…