nitpick package
Main module.
- class nitpick.Nitpick[source]
Bases:
object
The Nitpick API.
- configured_files(*partial_names: str) list[pathlib.Path] [source]
List of files configured in the Nitpick style.
Filter only the selected partial names.
- echo(message: str)[source]
Echo a message on the terminal, with the relative path at the beginning.
- enforce_present_absent(*partial_names: str) Iterator[Fuss] [source]
Enforce files that should be present or absent.
- Parameters:
partial_names – Names of the files to enforce configs for.
- Returns:
Fuss generator.
- enforce_style(*partial_names: str, autofix=True) Iterator[Fuss] [source]
Read the merged style and enforce the rules in it.
Get all root keys from the merged style (every key is a filename, except “nitpick”).
For each file name, find the plugin(s) that can handle the file.
- Parameters:
partial_names – Names of the files to enforce configs for.
autofix – Flag to modify files, if the plugin supports it (default: True).
- Returns:
Fuss generator.
- init(project_root: PathOrStr | None = None, offline: bool | None = None) Nitpick [source]
Initialize attributes of the singleton.
Subpackages
Submodules
- nitpick.blender module
BaseDoc
Comparison
ElementDetail
InlineTableTomlDecoder
InlineTableTomlDecoder.bounded_string()
InlineTableTomlDecoder.embed_comments()
InlineTableTomlDecoder.get_empty_inline_table()
InlineTableTomlDecoder.get_empty_table()
InlineTableTomlDecoder.load_array()
InlineTableTomlDecoder.load_inline_object()
InlineTableTomlDecoder.load_line()
InlineTableTomlDecoder.load_value()
InlineTableTomlDecoder.preserve_comment()
JsonDoc
ListDetail
SEPARATOR_QUOTED_SPLIT
SensibleYAML
SensibleYAML.Xdump_all()
SensibleYAML.block_seq_indent
SensibleYAML.compact()
SensibleYAML.compose()
SensibleYAML.compose_all()
SensibleYAML.composer
SensibleYAML.constructor
SensibleYAML.dump()
SensibleYAML.dump_all()
SensibleYAML.dumps()
SensibleYAML.emit()
SensibleYAML.emitter
SensibleYAML.get_constructor_parser()
SensibleYAML.get_serializer_representer_emitter()
SensibleYAML.indent
SensibleYAML.load()
SensibleYAML.load_all()
SensibleYAML.loads()
SensibleYAML.map()
SensibleYAML.official_plug_ins()
SensibleYAML.parse()
SensibleYAML.parser
SensibleYAML.reader
SensibleYAML.register_class()
SensibleYAML.representer
SensibleYAML.resolver
SensibleYAML.scan()
SensibleYAML.scanner
SensibleYAML.seq()
SensibleYAML.serialize()
SensibleYAML.serialize_all()
SensibleYAML.serializer
SensibleYAML.version
TomlDoc
YamlDoc
compare_lists_with_dictdiffer()
custom_reducer()
custom_splitter()
flatten_quotes()
is_scalar()
quote_if_dotted()
quote_reducer()
quoted_split()
quotes_splitter()
replace_or_add_list_element()
search_json()
set_key_if_not_empty()
traverse_toml_tree()
traverse_yaml_tree()
- nitpick.cli module
- nitpick.compat module
- nitpick.config module
- nitpick.constants module
- nitpick.core module
Configuration
Nitpick
Project
ToolNitpickSectionSchema
ToolNitpickSectionSchema.Meta
ToolNitpickSectionSchema.OPTIONS_CLASS
ToolNitpickSectionSchema.TYPE_MAPPING
ToolNitpickSectionSchema.dict_class
ToolNitpickSectionSchema.dump()
ToolNitpickSectionSchema.dumps()
ToolNitpickSectionSchema.error_messages
ToolNitpickSectionSchema.fields
ToolNitpickSectionSchema.from_dict()
ToolNitpickSectionSchema.get_attribute()
ToolNitpickSectionSchema.handle_error()
ToolNitpickSectionSchema.load()
ToolNitpickSectionSchema.loads()
ToolNitpickSectionSchema.on_bind_field()
ToolNitpickSectionSchema.opts
ToolNitpickSectionSchema.set_class
ToolNitpickSectionSchema.validate()
confirm_project_root()
find_main_python_file()
- nitpick.exceptions module
- nitpick.fields module
- nitpick.flake8 module
- nitpick.generic module
- nitpick.schemas module
BaseNitpickSchema
BaseNitpickSchema.Meta
BaseNitpickSchema.OPTIONS_CLASS
BaseNitpickSchema.TYPE_MAPPING
BaseNitpickSchema.dict_class
BaseNitpickSchema.dump()
BaseNitpickSchema.dumps()
BaseNitpickSchema.error_messages
BaseNitpickSchema.fields
BaseNitpickSchema.from_dict()
BaseNitpickSchema.get_attribute()
BaseNitpickSchema.handle_error()
BaseNitpickSchema.load()
BaseNitpickSchema.loads()
BaseNitpickSchema.on_bind_field()
BaseNitpickSchema.opts
BaseNitpickSchema.set_class
BaseNitpickSchema.validate()
BaseStyleSchema
BaseStyleSchema.Meta
BaseStyleSchema.OPTIONS_CLASS
BaseStyleSchema.TYPE_MAPPING
BaseStyleSchema.dict_class
BaseStyleSchema.dump()
BaseStyleSchema.dumps()
BaseStyleSchema.error_messages
BaseStyleSchema.fields
BaseStyleSchema.from_dict()
BaseStyleSchema.get_attribute()
BaseStyleSchema.handle_error()
BaseStyleSchema.load()
BaseStyleSchema.loads()
BaseStyleSchema.on_bind_field()
BaseStyleSchema.opts
BaseStyleSchema.set_class
BaseStyleSchema.validate()
IniSchema
IniSchema.Meta
IniSchema.OPTIONS_CLASS
IniSchema.TYPE_MAPPING
IniSchema.dict_class
IniSchema.dump()
IniSchema.dump_fields
IniSchema.dumps()
IniSchema.error_messages
IniSchema.exclude
IniSchema.fields
IniSchema.from_dict()
IniSchema.get_attribute()
IniSchema.handle_error()
IniSchema.load()
IniSchema.load_fields
IniSchema.loads()
IniSchema.on_bind_field()
IniSchema.opts
IniSchema.set_class
IniSchema.validate()
NitpickFilesSectionSchema
NitpickFilesSectionSchema.Meta
NitpickFilesSectionSchema.OPTIONS_CLASS
NitpickFilesSectionSchema.TYPE_MAPPING
NitpickFilesSectionSchema.dict_class
NitpickFilesSectionSchema.dump()
NitpickFilesSectionSchema.dump_fields
NitpickFilesSectionSchema.dumps()
NitpickFilesSectionSchema.error_messages
NitpickFilesSectionSchema.exclude
NitpickFilesSectionSchema.fields
NitpickFilesSectionSchema.from_dict()
NitpickFilesSectionSchema.get_attribute()
NitpickFilesSectionSchema.handle_error()
NitpickFilesSectionSchema.load()
NitpickFilesSectionSchema.load_fields
NitpickFilesSectionSchema.loads()
NitpickFilesSectionSchema.on_bind_field()
NitpickFilesSectionSchema.opts
NitpickFilesSectionSchema.set_class
NitpickFilesSectionSchema.validate()
NitpickMetaSchema
NitpickMetaSchema.Meta
NitpickMetaSchema.OPTIONS_CLASS
NitpickMetaSchema.TYPE_MAPPING
NitpickMetaSchema.dict_class
NitpickMetaSchema.dump()
NitpickMetaSchema.dump_fields
NitpickMetaSchema.dumps()
NitpickMetaSchema.error_messages
NitpickMetaSchema.exclude
NitpickMetaSchema.fields
NitpickMetaSchema.from_dict()
NitpickMetaSchema.get_attribute()
NitpickMetaSchema.handle_error()
NitpickMetaSchema.load()
NitpickMetaSchema.load_fields
NitpickMetaSchema.loads()
NitpickMetaSchema.on_bind_field()
NitpickMetaSchema.opts
NitpickMetaSchema.set_class
NitpickMetaSchema.validate()
NitpickSectionSchema
NitpickSectionSchema.Meta
NitpickSectionSchema.OPTIONS_CLASS
NitpickSectionSchema.TYPE_MAPPING
NitpickSectionSchema.dict_class
NitpickSectionSchema.dump()
NitpickSectionSchema.dump_fields
NitpickSectionSchema.dumps()
NitpickSectionSchema.error_messages
NitpickSectionSchema.exclude
NitpickSectionSchema.fields
NitpickSectionSchema.from_dict()
NitpickSectionSchema.get_attribute()
NitpickSectionSchema.handle_error()
NitpickSectionSchema.load()
NitpickSectionSchema.load_fields
NitpickSectionSchema.loads()
NitpickSectionSchema.on_bind_field()
NitpickSectionSchema.opts
NitpickSectionSchema.set_class
NitpickSectionSchema.validate()
NitpickStylesSectionSchema
NitpickStylesSectionSchema.Meta
NitpickStylesSectionSchema.OPTIONS_CLASS
NitpickStylesSectionSchema.TYPE_MAPPING
NitpickStylesSectionSchema.dict_class
NitpickStylesSectionSchema.dump()
NitpickStylesSectionSchema.dump_fields
NitpickStylesSectionSchema.dumps()
NitpickStylesSectionSchema.error_messages
NitpickStylesSectionSchema.exclude
NitpickStylesSectionSchema.fields
NitpickStylesSectionSchema.from_dict()
NitpickStylesSectionSchema.get_attribute()
NitpickStylesSectionSchema.handle_error()
NitpickStylesSectionSchema.load()
NitpickStylesSectionSchema.load_fields
NitpickStylesSectionSchema.loads()
NitpickStylesSectionSchema.on_bind_field()
NitpickStylesSectionSchema.opts
NitpickStylesSectionSchema.set_class
NitpickStylesSectionSchema.validate()
flatten_marshmallow_errors()
help_message()
- nitpick.style module
BuiltinStyle
ConfigValidator
FileFetcher
GitHubFetcher
GitHubURL
GitHubURL.api_url
GitHubURL.auth_token
GitHubURL.authorization_header
GitHubURL.default_branch
GitHubURL.from_furl()
GitHubURL.git_reference
GitHubURL.git_reference_or_default
GitHubURL.long_protocol_url
GitHubURL.owner
GitHubURL.path
GitHubURL.query_params
GitHubURL.raw_content_url
GitHubURL.repository
GitHubURL.short_protocol_url
GitHubURL.token
GitHubURL.url
HttpFetcher
PythonPackageFetcher
PythonPackageURL
Scheme
Scheme.FILE
Scheme.GH
Scheme.GITHUB
Scheme.HTTP
Scheme.HTTPS
Scheme.PY
Scheme.PYPACKAGE
Scheme.capitalize()
Scheme.casefold()
Scheme.center()
Scheme.count()
Scheme.encode()
Scheme.endswith()
Scheme.expandtabs()
Scheme.find()
Scheme.format()
Scheme.format_map()
Scheme.index()
Scheme.isalnum()
Scheme.isalpha()
Scheme.isascii()
Scheme.isdecimal()
Scheme.isdigit()
Scheme.isidentifier()
Scheme.islower()
Scheme.isnumeric()
Scheme.isprintable()
Scheme.isspace()
Scheme.istitle()
Scheme.isupper()
Scheme.join()
Scheme.ljust()
Scheme.lower()
Scheme.lstrip()
Scheme.maketrans()
Scheme.partition()
Scheme.removeprefix()
Scheme.removesuffix()
Scheme.replace()
Scheme.rfind()
Scheme.rindex()
Scheme.rjust()
Scheme.rpartition()
Scheme.rsplit()
Scheme.rstrip()
Scheme.split()
Scheme.splitlines()
Scheme.startswith()
Scheme.strip()
Scheme.swapcase()
Scheme.title()
Scheme.translate()
Scheme.upper()
Scheme.zfill()
StyleFetcher
StyleFetcherManager
StyleManager
StyleManager.cache_dir
StyleManager.cache_option
StyleManager.file_field_pair()
StyleManager.find_initial_styles()
StyleManager.get_default_style_url()
StyleManager.include_multiple_styles()
StyleManager.load_fixed_name_plugins()
StyleManager.merge_toml_dict()
StyleManager.offline
StyleManager.project
StyleManager.rebuild_dynamic_schema()
builtin_resources_root()
builtin_styles()
github_default_branch()
parse_cache_option()
repo_root()
- nitpick.tomlkit_ext module
- nitpick.typedefs module
- nitpick.violations module