andreoliwa/nitpick

View on GitHub
docs/ideas/toml.toml

Summary

Maintainability
Test Coverage
# Keys are absent
# See [Enforce absence of keys · Issue #10 · andreoliwa/nitpick](https://github.com/andreoliwa/nitpick/issues/10)
["pyproject.toml".tool.poetry.dev-dependencies]
pep257__exists = false
pycodestyle__exists = false
pur__exists = false
pep257 = "{{ nit.absent() }}" # Jinja
pycodestyle = "{{ nit.absent() }}" # Jinja
pur = "{{ nit.absent() }}" # Jinja

# Keys are absent
["pyproject.toml".tool.poetry.dependencies]
pep257__exists = false
pycodestyle__exists = false
pur__exists = false
pep257 = "{{ nit.absent() }}" # Jinja
pycodestyle = "{{ nit.absent() }}" # Jinja
pur = "{{ nit.absent() }}" # Jinja

# Pre-processing with Jinja to generate multiple sections with the same config? ["pyproject.toml".tool.poetry.{{ ['dependencies', 'dev-dependencies'] }}]
# https://github.com/andreoliwa/nitpick/issues/283

# Keys are present, with the expected types
["pyproject.toml".build-system]
requires__exists = "List[str]"
build-backend__exists = "str"
requires = "{{ nit.present(List[str]) }}" # Jinja
build-backend = "{{ nit.present(str) }}" # Jinja

# Integer key exists
["pyproject.toml".tool.black]
line-length__exists = "int"
line-length = "{{ nit.present(int) }}" # Jinja

# Section exists with anything inside
# [Enforce presence of keys (with any values) · Issue #218 · andreoliwa/nitpick](https://github.com/andreoliwa/nitpick/issues/218)
["pyproject.toml".tool.black2]
__exists = true
blabla = "{{ nit.section_present() }}" # Jinja