From 53147b51f90ba854605e49edd28b7d7895930c92 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Thu, 10 Oct 2024 13:00:25 -0500 Subject: [PATCH] Use valid type hints for Python 3.9 I have no idea how this made it past the linters. Signed-off-by: Tristan Partin --- test_runner/fixtures/neon_api.py | 6 +++--- test_runner/fixtures/pageserver/http.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test_runner/fixtures/neon_api.py b/test_runner/fixtures/neon_api.py index 683ea3af44..5934baccff 100644 --- a/test_runner/fixtures/neon_api.py +++ b/test_runner/fixtures/neon_api.py @@ -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) diff --git a/test_runner/fixtures/pageserver/http.py b/test_runner/fixtures/pageserver/http.py index 84a7e5f0a2..aa4435af4e 100644 --- a/test_runner/fixtures/pageserver/http.py +++ b/test_runner/fixtures/pageserver/http.py @@ -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 = {}