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

abravalheri / validate-pyproject / 5226968556240896

pending completion
5226968556240896

push

cirrus-ci

GitHub
Typo: validate-project => validate-pyproject (#78)

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
8✔
2

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

5
Schema = NewType("Schema", Mapping)
8✔
6
"""JSON Schema represented as a Python dict"""
3 only 5226968556240896.1, 5226968556240896.3, and 5226968556240896.6 ✔
7

8
ValidationFn = Callable[[T], T]
8✔
9
"""Custom validation function.
3 only 5226968556240896.1, 5226968556240896.3, and 5226968556240896.6 ✔
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]
8✔
16
"""Should return ``True`` when the input string satisfies the format"""
3 only 5226968556240896.1, 5226968556240896.3, and 5226968556240896.6 ✔
17

18
Plugin = Callable[[str], Schema]
8✔
19
"""A plugin is something that receives the name of a `tool` sub-table
8✔
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