|
7 | 7 | import re |
8 | 8 | from datetime import date |
9 | 9 | from pathlib import Path |
10 | | -from typing import Any, Dict, List, Optional |
| 10 | +from typing import Any, Dict, List, Optional, Union |
11 | 11 |
|
12 | 12 | from pydantic import ( |
13 | 13 | BaseModel, |
@@ -179,56 +179,56 @@ def at_least_one_target(cls, values): |
179 | 179 | no_sync_pyproject: Annotated[ |
180 | 180 | bool, Field(description="Do not sync with pyproject.toml.") |
181 | 181 | ] = False |
182 | | - pyproject_file: Annotated[Path, Field(description="pyproject.toml file path.")] = ( |
183 | | - Path("pyproject.toml") |
184 | | - ) |
| 182 | + pyproject_file: Annotated[ |
| 183 | + Union[Path, List[Path]], Field(description="pyproject.toml file path.") |
| 184 | + ] = Path("pyproject.toml") |
185 | 185 |
|
186 | 186 | no_sync_package_json: Annotated[ |
187 | 187 | bool, Field(description="Do not sync with package.json.") |
188 | 188 | ] = False |
189 | | - package_json_file: Annotated[Path, Field(description="package.json file path.")] = ( |
190 | | - Path("package.json") |
191 | | - ) |
| 189 | + package_json_file: Annotated[ |
| 190 | + Union[Path, List[Path]], Field(description="package.json file path.") |
| 191 | + ] = Path("package.json") |
192 | 192 |
|
193 | 193 | no_sync_julia: Annotated[ |
194 | 194 | bool, Field(description="Do not sync with Project.toml.") |
195 | 195 | ] = False |
196 | | - julia_file: Annotated[Path, Field(description="Project.toml file path.")] = Path( |
197 | | - "Project.toml" |
198 | | - ) |
| 196 | + julia_file: Annotated[ |
| 197 | + Union[Path, List[Path]], Field(description="Project.toml file path.") |
| 198 | + ] = Path("Project.toml") |
199 | 199 |
|
200 | 200 | no_sync_fortran: Annotated[ |
201 | 201 | bool, Field(description="Do not sync with fpm.toml.") |
202 | 202 | ] = False |
203 | | - fortran_file: Annotated[Path, Field(description="fpm.toml file path.")] = Path( |
204 | | - "fpm.toml" |
205 | | - ) |
| 203 | + fortran_file: Annotated[ |
| 204 | + Union[Path, List[Path]], Field(description="fpm.toml file path.") |
| 205 | + ] = Path("fpm.toml") |
206 | 206 |
|
207 | 207 | no_sync_pom_xml: Annotated[bool, Field(description="Do not sync with pom.xml.")] = ( |
208 | 208 | False |
209 | 209 | ) |
210 | | - pom_xml_file: Annotated[Path, Field(description="pom.xml file path.")] = Path( |
211 | | - "pom.xml" |
212 | | - ) |
| 210 | + pom_xml_file: Annotated[ |
| 211 | + Union[Path, List[Path]], Field(description="pom.xml file path.") |
| 212 | + ] = Path("pom.xml") |
213 | 213 |
|
214 | 214 | no_sync_mkdocs: Annotated[ |
215 | 215 | bool, Field(description="Do not sync with mkdocs.yml.") |
216 | 216 | ] = False |
217 | | - mkdocs_file: Annotated[Path, Field(description="mkdocs.yml file path.")] = Path( |
218 | | - "mkdocs.yml" |
219 | | - ) |
| 217 | + mkdocs_file: Annotated[ |
| 218 | + Union[Path, List[Path]], Field(description="mkdocs.yml file path.") |
| 219 | + ] = Path("mkdocs.yml") |
220 | 220 |
|
221 | 221 | no_sync_rust: Annotated[bool, Field(description="Do not sync with Cargo.toml.")] = ( |
222 | 222 | False |
223 | 223 | ) |
224 | | - rust_file: Annotated[Path, Field(description="Cargo.toml file path.")] = Path( |
225 | | - "Cargo.toml" |
226 | | - ) |
| 224 | + rust_file: Annotated[ |
| 225 | + Union[Path, List[Path]], Field(description="Cargo.toml file path.") |
| 226 | + ] = Path("Cargo.toml") |
227 | 227 |
|
228 | 228 | no_sync_cff: Annotated[bool, Field(description="Do not sync with CFF.")] = False |
229 | | - cff_file: Annotated[Path, Field(description="CFF file path.")] = Path( |
230 | | - "CITATION.cff" |
231 | | - ) |
| 229 | + cff_file: Annotated[ |
| 230 | + Union[Path, List[Path]], Field(description="CFF file path.") |
| 231 | + ] = Path("CITATION.cff") |
232 | 232 |
|
233 | 233 | no_sync_codemeta: Annotated[ |
234 | 234 | bool, Field(description="Do not sync with codemeta.json.") |
|
0 commit comments