(sig: Type, fdef: FuncDef)
| 260 | |
| 261 | |
| 262 | def set_callable_name(sig: Type, fdef: FuncDef) -> ProperType: |
| 263 | sig = get_proper_type(sig) |
| 264 | if isinstance(sig, FunctionLike): |
| 265 | if fdef.info: |
| 266 | if fdef.info.fullname in TPDICT_FB_NAMES: |
| 267 | # Avoid exposing the internal _TypedDict name. |
| 268 | class_name = "TypedDict" |
| 269 | else: |
| 270 | class_name = fdef.info.name |
| 271 | return sig.with_name(f"{fdef.name} of {class_name}") |
| 272 | else: |
| 273 | return sig.with_name(fdef.name) |
| 274 | else: |
| 275 | return sig |
| 276 | |
| 277 | |
| 278 | def calculate_tuple_fallback(typ: TupleType) -> None: |
no test coverage detected
searching dependent graphs…