Open GitRon opened 6 days ago
It is related to https://github.com/astral-sh/ruff/issues/12865 and applies to all other Django rules. Ruff doesn't support multi-file analysis. Some rules have some hacky implementations that follow inheritance chains in the same file, but these are more one-offs and it breaks as soon as you move the classes to different files. We're working on a more refined semantic model for ruff that supports multifile analysis but it's still far out.
@MichaReiser oh, thx! didn't know!
Issue
I use the
DJ
extension of ruff. I just found out that this doesn't work on forms that don't use ModelForm directly but an inherited class. This relates to DJ006.Code example
When I change the inheritance from
MyModelForm
toModelForm
, it complains as expected.List of keywords searched for
Tried out Commands
Ruff version
0.7.2
Ruff settings