Carl Meyer

Results 478 comments of Carl Meyer

`locals()` is not deprecated (in fact in a sense it's the most "public" of all of these APIs), so I don't understand why we would want to treat it as...

> Probably unrelated to this PR, but the error messages in pydantic seem to change non-deterministically. > > https://github.com/astral-sh/ruff/actions/runs/20226483261/job/58059016262?pr=21984 Yes, unfortunately this non-determinism in the error messages in some projects...

I rebased on main, but it seems that some other recent change in main means that we no longer emit the diagnostics for typevars with self-referential bounds/constraints.

Possible considerations when re-enabling it: 1. Separate rules for unused `type: ignore` vs unused `ty: ignore`, since it's useful to be able to suppress the former but not the latter...

This seems like something that needs to be cross-module and have type information.

Oh, yeah, I misunderstood the proposal. A type-aware lint rule could actually tell you when your patch is patching something that doesn't exist, but a non-type-aware rule could just tell...

Thanks for the report! I've opened #2193 to separately track the method-patching, since the two issues reported here have separate causes and fixes. This issue can track the `AsyncMock` patching....

Thanks @mtshiba for the deeper dive, that makes sense. Yet another reason to just eliminate `Unknown |` widening, IMO.

In https://github.com/astral-sh/ty/issues/1762#issuecomment-3616910856 @AlexWaygood suggests a workaround we could implement in our `assert_type` handling that could be an alternative to changing these `assert_type` usages upstream. (The rationale is that this issue...