(
self, tp: TypeInfo, members: list[str], context: Context
)
| 2116 | self.fail(f"Cannot use {method_name}() with {type_name} type", context) |
| 2117 | |
| 2118 | def report_non_method_protocol( |
| 2119 | self, tp: TypeInfo, members: list[str], context: Context |
| 2120 | ) -> None: |
| 2121 | self.fail( |
| 2122 | "Only protocols that don't have non-method members can be used with issubclass()", |
| 2123 | context, |
| 2124 | ) |
| 2125 | if len(members) < 3: |
| 2126 | attrs = ", ".join(members) |
| 2127 | self.note(f'Protocol "{tp.name}" has non-method member(s): {attrs}', context) |
| 2128 | |
| 2129 | def note_call( |
| 2130 | self, subtype: Type, call: Type, context: Context, *, code: ErrorCode | None |
no test coverage detected