(self, t: CallableType | Parameters)
| 222 | self.seen_aliases = seen_aliases |
| 223 | |
| 224 | def collect_vars(self, t: CallableType | Parameters) -> list[TypeVarLikeType]: |
| 225 | found_vars = [] |
| 226 | for arg in t.arg_types: |
| 227 | for tv in get_all_type_vars(arg): |
| 228 | if isinstance(tv, ParamSpecType): |
| 229 | normalized: TypeVarLikeType = tv.copy_modified( |
| 230 | flavor=ParamSpecFlavor.BARE, prefix=Parameters([], [], []) |
| 231 | ) |
| 232 | else: |
| 233 | normalized = tv |
| 234 | if normalized in self.poly_tvars and normalized not in self.bound_tvars: |
| 235 | found_vars.append(normalized) |
| 236 | return remove_dups(found_vars) |
| 237 | |
| 238 | def visit_callable_type(self, t: CallableType) -> Type: |
| 239 | found_vars = self.collect_vars(t) |
no test coverage detected