• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

abravalheri / validate-pyproject / 4900349245390848

pending completion
4900349245390848

Pull #82

cirrus-ci

Anderson Bravalheri
Add test case for extra keys in authors
Pull Request #82: Error-out when extra keys are added to project.authos/maintainers

255 of 261 branches covered (97.7%)

Branch coverage included in aggregate %.

736 of 746 relevant lines covered (98.66%)

10.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/validate_pyproject/types.py
1
from typing import Callable, Mapping, NewType, TypeVar
11✔
2

3
T = TypeVar("T", bound=Mapping)
11✔
4

5
Schema = NewType("Schema", Mapping)
11✔
6
"""JSON Schema represented as a Python dict"""
5✔
7

8
ValidationFn = Callable[[T], T]
11✔
9
"""Custom validation function.
5✔
10
It should receive as input a mapping corresponding to the whole
11
``pyproject.toml`` file and raise a :exc:`fastjsonschema.JsonSchemaValueException`
12
if it is not valid.
13
"""
14

15
FormatValidationFn = Callable[[str], bool]
11✔
16
"""Should return ``True`` when the input string satisfies the format"""
5✔
17

18
Plugin = Callable[[str], Schema]
11✔
19
"""A plugin is something that receives the name of a `tool` sub-table
11✔
20
(as defined  in PEPPEP621) and returns a :obj:`Schema`.
21

22
For example ``plugin("setuptools")`` should return the JSON schema for the
23
``[tool.setuptools]`` table of a ``pyproject.toml`` file.
24
"""
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc