Format type for an expression using current options. If type is known, second item returned is True. If type is not known, an error message is returned instead, and second item returned is False.
(self, expression: Expression)
| 227 | self.fg_manager.manager.options.export_types = old |
| 228 | |
| 229 | def expr_type(self, expression: Expression) -> tuple[str, bool]: |
| 230 | """Format type for an expression using current options. |
| 231 | |
| 232 | If type is known, second item returned is True. If type is not known, an error |
| 233 | message is returned instead, and second item returned is False. |
| 234 | """ |
| 235 | expr_type = self.fg_manager.manager.all_types.get(expression) |
| 236 | if expr_type is None: |
| 237 | return self.missing_type(expression), False |
| 238 | |
| 239 | type_str = format_type( |
| 240 | expr_type, self.fg_manager.manager.options, verbosity=self.verbosity |
| 241 | ) |
| 242 | return self.add_prefixes(type_str, expression), True |
| 243 | |
| 244 | def object_type(self) -> Instance: |
| 245 | builtins = self.fg_manager.graph["builtins"].tree |
nothing calls this directly
no test coverage detected