@@ -120,6 +120,9 @@ Module
120120 .. py :attribute :: _holds
121121 :type: str
122122
123+ .. py :attribute :: _regex_pattern
124+ :type: str
125+
123126
124127.. py :class :: comprehensiveconfig.spec.List[T](default_value: list[T] = [], / , inner_type: AnyConfigField | None = None , ** kwargs)
125128
@@ -133,6 +136,57 @@ Module
133136
134137 Might require manual annotation if your default value remains an empty list
135138
139+ .. py :class :: comprehensiveconfig.spec.PathField(default_value: Path | str | _NoDefaultValueT = NoDefaultValue, / , path_type: PathField.PathType = PathField.directory_or_file, path_validator: PathField.PathValidator = PathValidator.agnostic, ** kwargs)
140+
141+ :param Path | str | _NoDefaultValueT default_value: The default for this field.
142+ :param PathField.PathType path_type: Whether you want to only accept files, directories, or both
143+ :param PathField.PathValidator path_validator: Determines how it should validate the path string.
144+
145+ .. py :attribute :: _holds
146+ :type: Path
147+
148+ .. py :attribute :: _path_type
149+ :type: PathField.PathType
150+
151+ .. py :attribute :: _path_validator
152+ :type: PathField.PathValidator
153+
154+ .. py :class :: comprehensiveconfig.spec.PathField.PathType
155+
156+ This is an enum representing the types of paths we would like to support in this field.
157+
158+ .. py:data:: directory
159+
160+ We only want paths to point to directories!
161+
162+ .. py:data:: file
163+
164+ We only want paths to point to files!
165+
166+ .. py:data:: directory_or_file
167+
168+ Disables specific checks for what the paths are pointing to.
169+
170+ .. py:class :: comprehensiveconfig.spec.PathField.PathValidator
171+
172+ This is an enum representing the different path validators defined in :py:mod:`comprehensiveconfig.validators`
173+
174+ .. py:data:: windows
175+
176+ Paths should only be valid Windows paths.
177+
178+ .. py:data:: unix
179+
180+ Paths should only be valid Unix Paths
181+
182+ .. py:data:: agnostic
183+
184+ Checks for validity on Unix or Windows (only one needs to be valid).
185+
186+ .. py:data:: current_system
187+
188+ Uses the validator corresponding to the current current system.
189+
136190.. py:class :: comprehensiveconfig.spec.Table[K, V](default_value: dict[K, V] = {}, / , key_type: AnyConfigField | None = None , value_type: AnyConfigField | None = None , ** kwargs)
137191
138192 :param dict[K, V] default_value: The default value of the field. This always default to an empty dict (required for static type checking)
0 commit comments