Skip to content

Commit 69646ef

Browse files
committed
use "Union" in type hint to preserve Python 3.8 compatibility
1 parent da5c24c commit 69646ef

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/DatabaseLibrary/connection_manager.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from configparser import ConfigParser, NoOptionError, NoSectionError
1818
from dataclasses import dataclass
1919
from pathlib import Path
20-
from typing import TYPE_CHECKING, Any, Dict, Optional
20+
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
2121

2222
from robot.api import logger
2323

@@ -188,7 +188,7 @@ def connect_to_database(
188188
db_module: Optional[str] = None,
189189
db_name: Optional[str] = None,
190190
db_user: Optional[str] = None,
191-
db_password: Optional[Secret | str] = None,
191+
db_password: Optional[Union[Secret, str]] = None,
192192
db_host: Optional[str] = None,
193193
db_port: Optional[int] = None,
194194
db_charset: Optional[str] = None,

0 commit comments

Comments
 (0)