It would be logical that there is a configuration for bad-dunder-method-name as arbitrary libraries can 'define' them:
from pydantic import GetCoreSchemaHandler
from pydantic_core import CoreSchema
class MyClass:
@classmethod
def __get_pydantic_core_schema__( # PLW3201 Bad or misspelled dunder method name `__get_pydantic_core_schema__`. (bad-dunder-name)
cls, source_type: type[object], handler: GetCoreSchemaHandler
) -> CoreSchema: ...
Something like:
[tool.ruff.lint]
bad-dunder-method-name-exceptions = ["__get_pydantic_core_schema__"]
Also, the error message should reference this config option. (based mode: the LSP should offer to add it to the config)
It would be logical that there is a configuration for
bad-dunder-method-nameas arbitrary libraries can 'define' them:Something like:
Also, the error message should reference this config option. (based mode: the LSP should offer to add it to the config)