Anton Agestam

Results 59 issues of Anton Agestam

We currently end up having to add e.g. `assert isinstance(instance, SomeModel)` to update methods. I think it would make sense for `ModelSerializer` to be defined as approximately: ```python M =...

enhancement
help wanted

Hi! Since updating to 1.4.0 we see an odd issue when subclassing `UpdateModelMixin`: https://github.com/5monkeys/django-bananas/pull/61/checks?check_run_id=1855834150 ``` bananas/drf/fencing.py:101: error: Invalid self argument "FencedUpdateModelMixin" to attribute function "perform_update" with type "Callable[[UsesQuerySet[_MT], BaseSerializer[_MT]], None]"...

- [ ] This is a bug report - [x] This is a feature request - [x] I searched existing issues before opening this one Hi! We use `--mount=type=cache,target=/root/.cache/pip` for...

enhancement
rule

This is a continuation of this [discussion on the Intersection issue](https://github.com/python/typing/issues/213#issuecomment-344132917). I have a different use case for the `Not[...]` type, but it is related to the original discussion. My...

topic: feature

I have been frequently using positive and negative infinity as default values for values that should otherwise be `int`s. Because of Python's duck typing this is a convenient pattern that...

topic: feature

See discussion [here](https://github.com/django-money/django-money/pull/638#discussion_r890106119).

http://stackoverflow.com/questions/2669690/why-does-google-append-while1-in-front-of-their-json-responses

https://github.com/dry-python/classes - [ ] Figure out if a typeclasses are compatible with phantom types - [ ] Come up with a reasonable API that is optimally backwards compatible the `.parse()`...

```python class Foo( str, Phantom, predicate=is_foo, extend_schema=Schema(description="Foo bar, baz."), parser=parse_foo, ): ... ```