nitpick.plugins.pyproject_toml module

Checker for pyproject.toml.

class nitpick.plugins.pyproject_toml.PyProjectTomlPlugin(config: Dict[str, Any], file_name: str = None)[source]

Bases: nitpick.plugins.base.NitpickPlugin

Checker for pyproject.toml.

See also PEP 518.

Example: the Python 3.7 default. There are many other examples in Defaults.

check_exists() → Iterator[Tuple[int, int, str, Type]]

Check if the file should exist.

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

Check missing key/value pairs in pyproject.toml.

dynamic_name_classes = {}
error_base_number = 310
error_prefix = ''
file_name = 'pyproject.toml'
fixed_name_classes = {}
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.

classmethod get_compiled_jmespath_file_names()

Return a compiled JMESPath expression for file names, using the class name as part of the key.

identify_tags = {}
classmethod load_fixed_dynamic_classes()None

Separate classes with fixed file names from classes with dynamic files names.

suggest_initial_contents()str[source]

Suggest the initial content for this missing file.

validation_schema = None
warn_missing_different(comparison: nitpick.formats.Comparison, prefix_message: str = '')

Warn about missing and different keys.

nitpick.plugins.pyproject_toml.handle_config_file(config: Dict[str, Any], file_name: str, tags: Set[str]) → Optional[nitpick.plugins.base.NitpickPlugin][source]

Handle pyproject.toml file.

nitpick.plugins.pyproject_toml.plugin_class() → Type[nitpick.plugins.base.NitpickPlugin][source]

You should return your plugin class here.