mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 05:20:49 -05:00
[ty] Spell out "method resolution order" in unsupported-base subdiagnostic (#22194)
This commit is contained in:
@@ -53,7 +53,7 @@ warning[unsupported-base]: Unsupported class base
|
||||
18 |
|
||||
19 | reveal_mro(Foo) # revealed: (<class 'Foo'>, Unknown, <class 'object'>)
|
||||
|
|
||||
info: ty cannot resolve a consistent MRO for class `Foo` due to this base
|
||||
info: ty cannot resolve a consistent method resolution order (MRO) for class `Foo` due to this base
|
||||
info: Only class objects or `Any` are supported as class bases
|
||||
info: rule `unsupported-base` is enabled by default
|
||||
|
||||
@@ -68,7 +68,7 @@ warning[unsupported-base]: Unsupported class base
|
||||
27 | class D(C): ... # error: [unsupported-base]
|
||||
| ^ Has type `<class 'mdtest_snippet.<locals of function 'f'>.C @ src/mdtest_snippet.py:23'> | <class 'mdtest_snippet.<locals of function 'f'>.C @ src/mdtest_snippet.py:25'>`
|
||||
|
|
||||
info: ty cannot resolve a consistent MRO for class `D` due to this base
|
||||
info: ty cannot resolve a consistent method resolution order (MRO) for class `D` due to this base
|
||||
info: Only class objects or `Any` are supported as class bases
|
||||
info: rule `unsupported-base` is enabled by default
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ warning[unsupported-base]: Unsupported class base
|
||||
7 | class Bad1:
|
||||
8 | def __mro_entries__(self, bases, extra_arg):
|
||||
|
|
||||
info: ty cannot resolve a consistent MRO for class `Bar` due to this base
|
||||
info: ty cannot resolve a consistent method resolution order (MRO) for class `Bar` due to this base
|
||||
info: Only class objects or `Any` are supported as class bases
|
||||
info: rule `unsupported-base` is enabled by default
|
||||
|
||||
|
||||
@@ -3532,7 +3532,7 @@ fn report_unsupported_base(
|
||||
base_type.display(db)
|
||||
));
|
||||
diagnostic.info(format_args!(
|
||||
"ty cannot resolve a consistent MRO for class `{}` due to this base",
|
||||
"ty cannot resolve a consistent method resolution order (MRO) for class `{}` due to this base",
|
||||
class.name(db)
|
||||
));
|
||||
diagnostic.info("Only class objects or `Any` are supported as class bases");
|
||||
|
||||
Reference in New Issue
Block a user