This PR moves the codebase towards using more contemporary typing patterns via the from __future__ import annotations backport mechanism. Main changes are:
dict[str, str], list[int] instead of from typing import Dict, List, Dict[str, str], List[int]
int | str instead of from typing import UnionUnion[int, str]
int | None instead of Optional[int]
Turns out this needed a little bit of manual work. For now, here is a demo of what this looks like. I've covered the main census API, but not the tests or experimental yet.
This PR moves the codebase towards using more contemporary typing patterns via the
from __future__ import annotations
backport mechanism. Main changes are:dict[str, str]
,list[int]
instead offrom typing import Dict, List
,Dict[str, str]
,List[int]
int | str
instead offrom typing import Union
Union[int, str]
int | None
instead ofOptional[int]
Turns out this needed a little bit of manual work. For now, here is a demo of what this looks like. I've covered the main census API, but not the tests or experimental yet.