Brent Westbrook
Brent Westbrook
I think this would have to be a different rule since FAST002 is only inspecting the default values looking for `Query`, `Depends`, etc. This would require validating the annotation itself...
Hmm, maybe this pattern is more common than we thought. It definitely comes up in a quick [GitHub search](https://github.com/search?q=language%3Apython+%2FAnnotated%5C%5B%5B%5E%2C%5D%2B%2C+%5B%5E%5D%5D%2B%5D+%5C%7C%2F&type=code&p=2).
This might make sense as an extension to SIM118 rather than a separate rule too.
Do you mean a parameter annotated with `None`? ```py import pytest @pytest.fixture def some_fixture(): ... def test_something(some_fixture: None): do_something() ``` It sounds kind of interesting, but it also seems like...
Sorry I should have expanded a bit more. I just meant that it would feel non-obvious to me, if I saw an ARG001 diagnostic, that I could annotate the parameter...
Thanks for looking into it. I'll label this explicitly as `needs-decision` and we can see what others think or if they've also run into this. I'm still not totally convinced...
I realized today that we have a somewhat related rule in [pytest-fixture-param-without-value (PT019)](https://docs.astral.sh/ruff/rules/pytest-fixture-param-without-value/#pytest-fixture-param-without-value-pt019) that recommends using `@pytest.mark.usefixtures` ([pytest docs](https://docs.pytest.org/en/stable/how-to/fixtures.html#use-fixtures-in-classes-and-modules-with-usefixtures)). That could be another workaround here that also seems to be...
Thanks for reporting this! We might at least be able to check for methods inherited from base classes in the same file.
I think `@override` is just a shortcut for ruff to avoid actually inspecting the inheritance hierarchy. @MichaReiser added the `type-inference` label, I think because full type inference and multi-file diagnostics...
I think it makes sense to reopen this. The issue won't truly be closed until we can use type inference to check if the method is an override, but we...