general: migrate modules to use 3.9 features

This commit is contained in:
Dima Gerasimov 2024-10-19 22:10:40 +01:00 committed by karlicoss
parent d3f9a8e8b6
commit 8496d131e7
125 changed files with 889 additions and 739 deletions

View file

@ -7,20 +7,20 @@ REQUIRES = [
"protobuf", # for parsing blobs from the database
]
from collections.abc import Iterator, Sequence
from dataclasses import dataclass
from datetime import datetime, timezone
from pathlib import Path
from typing import Any, Iterator, Optional, Sequence
from typing import Any
from urllib.parse import quote
from my.core import datetime_aware, get_files, LazyLogger, Paths, Res
from my.core import LazyLogger, Paths, Res, datetime_aware, get_files
from my.core.common import unique_everseen
from my.core.sqlite import sqlite_connection
import my.config
from ._android_protobuf import parse_labeled, parse_list, parse_place
import my.config # isort: skip
logger = LazyLogger(__name__)
@ -59,8 +59,8 @@ class Place:
updated_at: datetime_aware # TODO double check it's utc?
title: str
location: Location
address: Optional[str]
note: Optional[str]
address: str | None
note: str | None
@property
def place_url(self) -> str: