Anton Agestam

Results 134 comments of Anton Agestam

Update: I started working on this but ran into a few issues. I had anticipated that mypy could bind a generic typevar in an outer class using a classvar in...

As type arguments seem to be the only way to bind type vars I now think this will not be feasible without an upstream change to implement `__class_getitem__`. I might...

That's the same conclusion I came to as well. Don't know if this would be possible with a plugin, but for me the requirement to specify the model twice is...

@sobolevn Ah, hmm, I see your point. I'm losing the connection between self and the serializer argument. I think using advanced self types might not be a fit perfect here...

@sobolevn Right, self types seem to bite me every time I think their going to save me ^^ Typing `UpdateModelMixin` (and siblings) with that abstract method might be a solution,...

Turns out using an abstract method didn't work so well after all since that ends up overriding the implementation in the MRO and breaks when the concrete class defines `queryset...

How would an immutable list type differ from Python's tuple?

Here's the relevant section: ``` RUN --mount=type=cache,target=/root/.cache/pip \ set -x && \ pip install pip==$PIP_PIP_VERSION pip-tools==$PIP_PIP_TOOLS_VERSION && \ pip install --require-hashes --pre -r reqs/requirements.txt && \ if [ "${BUILD_TARGET}" =...

@JelleZijlstra Just a nitpick but "they could just write `limit: int | float`", that wouldn't be equivalent as that wouldn't give a type error for `less_than(1, 5.5)` (I really only...

@hauntsaninja No that would not have worked, as already repeated, the real usecase really required int.