nitpick.flake8 module

Flake8 plugin to check files.

class nitpick.flake8.NitpickExtension(tree=None, filename='(none)')[source]

Bases: nitpick.mixin.NitpickMixin

Main class for the flake8 extension.

static add_options(option_manager: flake8.options.manager.OptionManager)[source]

Add the offline option.

check_files(present: bool) → Iterator[Tuple[int, int, str, Type]][source]

Check files that should be present or absent.

error_base_number = 100
error_prefix = ''
flake8_error(number: int, message: str, suggestion: str = None, add_to_base_number=True) → Tuple[int, int, str, Type]

Return a flake8 error as a tuple.

name = 'nitpick'
static parse_options(option_manager: flake8.options.manager.OptionManager, options, args)[source]

Create the Nitpick app, set logging from the verbose flags, set offline mode.

This function is called only once by flake8, so it’s a good place to create the app.

run() → Iterator[Tuple[int, int, str, Type]][source]

Run the check plugin.

version = '0.22.2'
warn_missing_different(comparison: nitpick.formats.Comparison, prefix_message: str = '')

Warn about missing and different keys.