|
1 | 1 | # pylint: disable=no-self-argument,line-too-long,no-name-in-module |
2 | 2 | from datetime import datetime |
3 | | -from typing import Dict, Optional, Set, Tuple |
| 3 | +from typing import Optional |
4 | 4 |
|
5 | 5 | from optimade.models.entries import EntryResource, EntryResourceAttributes |
6 | 6 | from optimade.models.utils import OptimadeField, StrictField, SupportLevel |
|
11 | 11 | ) |
12 | 12 |
|
13 | 13 |
|
14 | | -CORRELATED_FILE_FIELDS: Tuple[Set[str], ...] |
| 14 | +CORRELATED_FILE_FIELDS: tuple[set[str], ...] |
15 | 15 |
|
16 | 16 |
|
17 | 17 | class FileResourceAttributes(EntryResourceAttributes): |
@@ -142,7 +142,7 @@ class FileResourceAttributes(EntryResourceAttributes): |
142 | 142 | queryable=SupportLevel.OPTIONAL, |
143 | 143 | ) |
144 | 144 |
|
145 | | - checksums: Optional[Dict[str, str]] = OptimadeField( |
| 145 | + checksums: Optional[dict[str, str]] = OptimadeField( |
146 | 146 | ..., |
147 | 147 | description="""Dictionary providing checksums of file contents. |
148 | 148 | * **Type**: dictionary with keys identifying checksum functions and values (strings) giving the actual checksums |
@@ -217,7 +217,7 @@ class FileResource(EntryResource): |
217 | 217 |
|
218 | 218 | - **Examples**: |
219 | 219 | - `"structures"`""", |
220 | | - regex="^files$", |
| 220 | + pattern="^files$", |
221 | 221 | support=SupportLevel.MUST, |
222 | 222 | queryable=SupportLevel.MUST, |
223 | 223 | ) |
|
0 commit comments