nitpick.exceptions module

Nitpick exceptions.

exception nitpick.exceptions.NitpickError(*args: object)[source]

Bases: Exception

A Nitpick error raise flake8 errors.

add_to_base_number = True
args
error_base_number: int = 0
error_prefix: str = ''
message: str = ''
number: int = 0
suggestion: str = None
with_traceback()

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

exception nitpick.exceptions.NoPythonFile(root_dir: pathlib.Path, *args: object)[source]

Bases: nitpick.exceptions.PluginError

No Python file was found.

add_to_base_number = True
args
error_base_number = 100
error_prefix = ''
message = 'No Python file was found on the root dir and subdir of {!r}'
number = 2
suggestion = None
with_traceback()

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

exception nitpick.exceptions.NoRootDir(*args: object)[source]

Bases: nitpick.exceptions.PluginError

No root dir found.

add_to_base_number = True
args
error_base_number = 100
error_prefix = ''
message = 'No root dir found (is this a Python project?)'
number = 1
suggestion = None
with_traceback()

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

exception nitpick.exceptions.PluginError(*args: object)[source]

Bases: nitpick.exceptions.NitpickError

Plugin error.

add_to_base_number = True
args
error_base_number = 100
error_prefix = ''
message = ''
number = 0
suggestion = None
with_traceback()

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

exception nitpick.exceptions.StyleError(style_file_name: str, *args: object)[source]

Bases: nitpick.exceptions.NitpickError

An error in a style file.

add_to_base_number = False
args
error_base_number = 0
error_prefix = ''
message = ''
number = 1
suggestion = None
with_traceback()

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