Open roikoren755 opened 1 year ago
Hi @charliermarsh 👋 Any eta on this issue?
I think this can be closed? At least the given example cannot be reproduced unless there's something more to it.
I think this can be closed? At least the given example cannot be reproduced unless there's something more to it.
the comment on the linked pull request suggests the fix only works for direct inheritance, and not transitive inheritance
Perhaps it would be worth having an option to specify the parent classes to ignore when applying this rule?
For example, I'm using Beanie and running into a similar issue whereby this rule should be ignored for beanie.Document subclasses.
Something like;
[tool.ruff.lint.ruff]
ignore-ruf012-classes = ["pydantic.BaseModel", "beanie.Document"]
Should the tag multifile-analysis
be added, as base classes could be in other files?
First of all, once again, I'd like to thank you for a great library.
The recently added RUF012 rule warns with false positives for classes that extend a Pydantic model.
Ruff version:
ruff 0.0.277