Use valid type hints for Python 3.9

I have no idea how this made it past the linters.

Signed-off-by: Tristan Partin <tristan@neon.tech>
This commit is contained in:
Tristan Partin
2024-10-10 13:00:25 -05:00
committed by GitHub
parent 006d9dfb6b
commit 53147b51f9
2 changed files with 4 additions and 4 deletions

View File

@@ -185,8 +185,8 @@ class NeonAPI:
def get_connection_uri(
self,
project_id: str,
branch_id: str | None = None,
endpoint_id: str | None = None,
branch_id: Optional[str] = None,
endpoint_id: Optional[str] = None,
database_name: str = "neondb",
role_name: str = "neondb_owner",
pooled: bool = True,
@@ -262,7 +262,7 @@ class NeonAPI:
class NeonApiEndpoint:
def __init__(self, neon_api: NeonAPI, pg_version: PgVersion, project_id: str | None):
def __init__(self, neon_api: NeonAPI, pg_version: PgVersion, project_id: Optional[str]):
self.neon_api = neon_api
if project_id is None:
project = neon_api.create_project(pg_version)

View File

@@ -886,7 +886,7 @@ class PageserverHttpClient(requests.Session, MetricsGetter):
self,
tenant_id: Union[TenantId, TenantShardId],
timeline_id: TimelineId,
batch_size: int | None = None,
batch_size: Optional[int] = None,
**kwargs,
) -> set[TimelineId]:
params = {}