Convert a type to a relatively short string suitable for error messages. `verbosity` is a coarse-grained control on the verbosity of the type This function returns a string appropriate for unmodified use in error messages; this means that it will be quoted in most cases. If m
(
typ: Type, options: Options, verbosity: int = 0, module_names: bool = False
)
| 2948 | |
| 2949 | |
| 2950 | def format_type( |
| 2951 | typ: Type, options: Options, verbosity: int = 0, module_names: bool = False |
| 2952 | ) -> str: |
| 2953 | """ |
| 2954 | Convert a type to a relatively short string suitable for error messages. |
| 2955 | |
| 2956 | `verbosity` is a coarse-grained control on the verbosity of the type |
| 2957 | |
| 2958 | This function returns a string appropriate for unmodified use in error |
| 2959 | messages; this means that it will be quoted in most cases. If |
| 2960 | modification of the formatted string is required, callers should use |
| 2961 | format_type_bare. |
| 2962 | """ |
| 2963 | return quote_type_string(format_type_bare(typ, options, verbosity, module_names)) |
| 2964 | |
| 2965 | |
| 2966 | def format_type_bare( |
no test coverage detected
searching dependent graphs…