better_trace._did_you_mean

Attributes

Functions

suggest_name_error(→ None)

suggest_name_error is a function that takes two paramters, exc and tb.

suggest_attribute_error(→ None)

suggest_attribute_error is a function that takes one paramter, exc.

suggest_module_not_found_error(→ None)

suggest_import_error(→ None)

Module Contents

better_trace._did_you_mean._has_rich: bool = True
better_trace._did_you_mean._has_rich = False
better_trace._did_you_mean.all_modules
better_trace._did_you_mean.suggest_name_error(exc: NameError, tb: types.TracebackType) None

suggest_name_error is a function that takes two paramters, exc and tb. It is used to suggest ‘Did you mean: …? for NameErrors’ Args:

exc (NameError): The NameError object tb (TracebackType): The traceback object

Returns:

None

## Used by:
  • print_verbose

  • print_context

  • print_compact

  • print_minimal

## Notes:

This is an internal function, so don’t call it.

better_trace._did_you_mean.suggest_attribute_error(exc: AttributeError) None

suggest_attribute_error is a function that takes one paramter, exc. It is used to suggest ‘Did you mean: …? for AttributeErrors’ Args:

exc (AttributeError): The AttributeError object

Returns:

None

## Used by:
  • print_verbose

  • print_context

  • print_compact

  • print_minimal

## Notes:

This is an internal function, so don’t call it.

better_trace._did_you_mean.suggest_module_not_found_error(exc: ModuleNotFoundError) None
better_trace._did_you_mean.suggest_import_error(exc: ImportError) None