David Salvisberg
David Salvisberg
Turns out ruff already properly clears the `TYPE_DEFINITION` flag for the second argument of `Annotated`, however there are additional flags for string annotations with a `__future__` import and for the...
Looks like forward references to symbols that occur later in the code are not handled correctly yet. Is there already a standard way to perform a binding lookup in a...
I'm struggling to implement an accurate runtime binding lookup since in addition to retrieving an accurate text range for the definition I need to special case class scopes: ```python class...
Looks like what I want is `lookup_symbol` but I will need to modify the state before the call so the function no longer thinks we're inside a forward reference. That...
Doing the check earlier doesn't work either, because I still need to know about bindings that occur lexicographically later, so it can be distinguished from actually undefined names. In flake8-type-checking...
@charliermarsh It might be worth to move the TCH010 logic to where the TCH008 logic currently sits, so we can actually autofix TCH010 in the same cases where we would...
@charliermarsh Just a friendly reminder in case this PR slipped through the cracks somehow
@charliermarsh Another reminder. Please let me know if these reminders are a bother. The contribution guidelines don't really seem to contain any information about whether it's acceptable/appreciated/frowned upon to bump...
@MichaReiser The tests should still be in their own test function, since both rules are enabled in that test function. That's how we made sure there were no circularity issues.
@MichaReiser Also the fix safety comment is only correct for one of the rules, the other rule is always marked as unsafe but I still don't know why, I'm just...