class NitpickJSONFileSectionSchema(BaseNitpickSchema): """Validation schema for the ``[nitpick.JSONFile]`` section on the style file.""" error_messages = { "unknown": help_message("Unknown configuration", "nitpick_section.html#nitpick-jsonfile") } file_names = fields.List(fields.String)
class SetupCfgSchema(BaseNitpickSchema): """Validation schema for setup.cfg.""" error_messages = { "unknown": help_message("Unknown configuration", "nitpick_section.html#comma-separated-values") } comma_separated_values = fields.List( fields.String(validate=fields.validate_section_dot_field))
class TextSchema(Schema): """Validation schema for the text file TOML configuration.""" error_messages = {"unknown": help_message("Unknown configuration", TEXT_FILE_RTFD_PAGE)} contains = fields.List(fields.Nested(TextItemSchema))
class JSONFileSchema(BaseNitpickSchema): """Validation schema for any JSON file added to the style.""" contains_keys = fields.List(fields.FilledString) contains_json = fields.Dict(fields.FilledString, fields.JSONString)