Alex Waygood

Results 861 comments of Alex Waygood

I can have a stab at getting `mypy_test.py` and `regr_test.py` to work with non-types dependencies. I don't know where to start when it comes to getting pyright and pytype to...

> Couldn't a script be made for that, and re-used. Quite possibly. My point was just that I haven't really looked at `pytype_test.py`, and don't really know how it works,...

I think we can maybe do both. I agree with @Akuli that the language in `create_baseline_stubs.py` is definitely outdated — nowadays, we're pretty keen to emphasise that contributors shouldn't have...

If we adopted pre-commit.ci (#13281), then black and isort would be auto-applied to PRs that violate the coding style, so contributors wouldn't need to manually fix their PRs.

It's the same bug as this: #12392 (I guess this isn't, strictly speaking, a duplicate, however). The underlying issue is that mypy still struggles with `type[T]` being used in runtime...

> But I think we should rather recommend to use the `_typeshed.IdentityFunction` protocol, instead of recommending a custom protocol. I think it's important to note that this only works in...

Mypy has to implement quite a lot of special-casing in order to support `super()` at all. I think it's pretty unlikely that mypy is going to add the necessary complexity...

> Strange here is if I remove the parameter `i`, the error would disappear. I think that's just because [mypy doesn't check functions that are completely unannotated](https://mypy.readthedocs.io/en/stable/common_issues.html#no-errors-reported-for-obviously-wrong-code). You still get...

I'm guessing all of these tests would break if something like #12712 was ever merged (there seems to be a consensus that it would be good to do something like...

> Further, it would be great if stubtest defines error codes/categories to ignore only those categories for a function/argument Yup: https://github.com/python/mypy/blob/0a720edb1489af6da63f0731cbc66263598a5a5d/mypy/stubtest.py#L108