anthony sottile

Results 159 comments of anthony sottile

I hit this as well a long while ago and here's how I fixed it https://github.com/getsentry/sentry/commit/194fefd0bd6deeb9363a7a6a5f5b162604e60d88

it's not though -- `bytes.join` can't receive an async iterator you're reading my patch backwards btw -- the fix is to use `.getvalue()`

5.2.1 I have a similar problem now with StreamingHttpResponse: ``` tests/sentry/api/test_base.py:495: error: Subclass of "Response" and "StreamingHttpResponse" cannot exist: would have incompatible method signatures [unreachable] ```

bisected to 08cdfe576d62fc3a2dfc33197a3260cb0a0dc097 #2654 cc @UnknownPlatypus used this: ```python from rest_framework.response import Response from django.http.response import StreamingHttpResponse x: Response if isinstance(x, StreamingHttpResponse): print(1) ``` and `git bisect run bash -c...

apparently for that one it is the `def content(self) -> NoReturn: ...` property

this is almost certainly wrong but this does make the example pass: ```diff diff --git a/mypy/semanal.py b/mypy/semanal.py index 03e6172bb..3cfd6a6b0 100644 --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -3126,7 +3126,16 @@ class SemanticAnalyzer(...

scratch that, I think that only "worked" because subclassing `Any` is allowed

this also makes the example pass and seems to properly preserve the dynamic class and may give me enough for a workaround: ```diff ctx.api.defer() + ph = PlaceholderNode( + ctx.api.qualified_name(ctx.name),...

on it, will link https://github.com/python/mypy/issues/2220