types.py
Complex types, annotations, validators.
LazyDict
¶
Bases: Mapping[_K, _V]
A dict where values are functions that get evaluated only once when requested.
Source code in copier/_types.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
Phase
¶
Bases: str, Enum
The known execution phases.
Source code in copier/_types.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
current()
classmethod
¶
Get the current phase.
Source code in copier/_types.py
121 122 123 124 | |
use(phase)
classmethod
¶
Set the current phase for the duration of a context.
Source code in copier/_types.py
111 112 113 114 115 116 117 118 119 | |
path_is_absolute(value)
¶
Require absolute paths in an argument.
Source code in copier/_types.py
53 54 55 56 57 58 59 | |
path_is_relative(value)
¶
Require relative paths in an argument.
Source code in copier/_types.py
62 63 64 65 66 67 68 | |