You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			30 lines
		
	
	
		
			630 B
		
	
	
	
		
			Python
		
	
			
		
		
	
	
			30 lines
		
	
	
		
			630 B
		
	
	
	
		
			Python
		
	
"""
 | 
						|
Some (initially private) typing helpers for jsonschema's types.
 | 
						|
"""
 | 
						|
from collections.abc import Iterable
 | 
						|
from typing import Any, Callable, Protocol, Union
 | 
						|
 | 
						|
import referencing.jsonschema
 | 
						|
 | 
						|
from jsonschema.protocols import Validator
 | 
						|
 | 
						|
 | 
						|
class SchemaKeywordValidator(Protocol):
 | 
						|
    def __call__(
 | 
						|
        self,
 | 
						|
        validator: Validator,
 | 
						|
        value: Any,
 | 
						|
        instance: Any,
 | 
						|
        schema: referencing.jsonschema.Schema,
 | 
						|
    ) -> None:
 | 
						|
        ...
 | 
						|
 | 
						|
 | 
						|
id_of = Callable[[referencing.jsonschema.Schema], Union[str, None]]
 | 
						|
 | 
						|
 | 
						|
ApplicableValidators = Callable[
 | 
						|
    [referencing.jsonschema.Schema],
 | 
						|
    Iterable[tuple[str, Any]],
 | 
						|
]
 |