Files
fotoplaner/venv/lib/python3.12/site-packages/polyfactory/constants.py
T
anders 16c54c6653 Tilføjet venv med docling og afhængigheder
Testfiler opdelt i PNG og previews
2026-10-27 12:20:23 +01:00

40 lines
809 B
Python

from __future__ import annotations
from collections import abc, defaultdict, deque
from collections.abc import Iterable, Mapping, Sequence
from random import Random
from typing import (
Union,
)
try:
from types import UnionType
except ImportError:
UnionType = Union # type: ignore[misc,assignment]
# Mapping of type annotations into concrete types.
TYPE_MAPPING = {
defaultdict: defaultdict,
deque: deque,
dict: dict,
frozenset: frozenset,
Iterable: list,
list: list,
Mapping: dict,
Sequence: list,
set: set,
tuple: tuple,
abc.Iterable: list,
abc.Mapping: dict,
abc.Sequence: list,
abc.Set: set,
UnionType: Union,
}
DEFAULT_RANDOM = Random()
RANDOMIZE_COLLECTION_LENGTH = False
MIN_COLLECTION_LENGTH = 0
MAX_COLLECTION_LENGTH = 5