(self, expressions: list[Expression], kind: str)
| 281 | super().visit_generator_expr(o) |
| 282 | |
| 283 | def check_iteration(self, expressions: list[Expression], kind: str) -> None: |
| 284 | for expr in expressions: |
| 285 | typ = self.get_type(expr) |
| 286 | if isinstance(typ, AnyType): |
| 287 | self.annotate(expr, f'{kind} uses generic operations (iterable has type "Any").') |
| 288 | elif isinstance(typ, Instance) and typ.type.fullname in ( |
| 289 | "typing.Iterable", |
| 290 | "typing.Iterator", |
| 291 | "typing.Sequence", |
| 292 | "typing.MutableSequence", |
| 293 | ): |
| 294 | self.annotate( |
| 295 | expr, |
| 296 | f'{kind} uses generic operations (iterable has the abstract type "{typ.type.fullname}").', |
| 297 | ) |
| 298 | |
| 299 | def visit_class_def(self, o: ClassDef, /) -> None: |
| 300 | super().visit_class_def(o) |
no test coverage detected