Skip to content

Commit 0c369c0

Browse files
committed
fix: update type annotations to modern Python 3.10+ syntax
1 parent f32ccd4 commit 0c369c0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/integration/test_watermark_image_file_integration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import os
44
from pathlib import Path
5-
from typing import Optional, Union
65

76
import pytest
87

@@ -11,16 +10,16 @@
1110
try:
1211
from . import integration_config # type: ignore[attr-defined]
1312

14-
API_KEY: Optional[str] = integration_config.API_KEY
15-
BASE_URL: Optional[str] = getattr(integration_config, "BASE_URL", None)
13+
API_KEY: str | None = integration_config.API_KEY
14+
BASE_URL: str | None = getattr(integration_config, "BASE_URL", None)
1615
TIMEOUT: int = getattr(integration_config, "TIMEOUT", 60)
1716
except ImportError:
1817
API_KEY = None
1918
BASE_URL = None
2019
TIMEOUT = 60
2120

2221

23-
def assert_is_pdf(file_path_or_bytes: Union[str, bytes]) -> None:
22+
def assert_is_pdf(file_path_or_bytes: str | bytes) -> None:
2423
"""Assert that a file or bytes is a valid PDF."""
2524
if isinstance(file_path_or_bytes, str):
2625
with open(file_path_or_bytes, "rb") as f:

0 commit comments

Comments
 (0)