nitpick.exceptions module

Nitpick exceptions.

class nitpick.exceptions.Deprecation[source]

Bases: object

All deprecation messages in a single class.

When it’s time to break compatibility, remove a method/warning below, and older config files will trigger validation errors on Nitpick.

static jsonfile_section(style_errors: Dict[str, Any]) bool[source]

The [nitpick.JSONFile] is not needed anymore; JSON files are now detected by the extension.

static pre_commit_without_dash(path_from_root: str) bool[source]

The pre-commit config should start with a dot on the config file.

exception nitpick.exceptions.QuitComplainingError(violations: Union[nitpick.violations.Fuss, List[nitpick.violations.Fuss]])[source]

Bases: Exception

Quit complaining and exit the application.


Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

nitpick.exceptions.pretty_exception(err: Exception, message: str = '')[source]

Return a pretty error message with the full path of the Exception.