mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
[sqlite3] Use TypeAlias for isolation_level (#14460)
This commit is contained in:
+8
-7
@@ -16,8 +16,9 @@ from sqlite3 import (
|
||||
ProgrammingError as ProgrammingError,
|
||||
Row as Row,
|
||||
Warning as Warning,
|
||||
_IsolationLevel,
|
||||
)
|
||||
from typing import Any, Final, Literal, TypeVar, overload
|
||||
from typing import Any, Final, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
@@ -225,7 +226,7 @@ if sys.version_info >= (3, 12):
|
||||
database: StrOrBytesPath,
|
||||
timeout: float = 5.0,
|
||||
detect_types: int = 0,
|
||||
isolation_level: Literal["DEFERRED", "EXCLUSIVE", "IMMEDIATE"] | None = "DEFERRED",
|
||||
isolation_level: _IsolationLevel = "DEFERRED",
|
||||
check_same_thread: bool = True,
|
||||
cached_statements: int = 128,
|
||||
uri: bool = False,
|
||||
@@ -237,7 +238,7 @@ if sys.version_info >= (3, 12):
|
||||
database: StrOrBytesPath,
|
||||
timeout: float,
|
||||
detect_types: int,
|
||||
isolation_level: Literal["DEFERRED", "EXCLUSIVE", "IMMEDIATE"] | None,
|
||||
isolation_level: _IsolationLevel,
|
||||
check_same_thread: bool,
|
||||
factory: type[_ConnectionT],
|
||||
cached_statements: int = 128,
|
||||
@@ -250,7 +251,7 @@ if sys.version_info >= (3, 12):
|
||||
database: StrOrBytesPath,
|
||||
timeout: float = 5.0,
|
||||
detect_types: int = 0,
|
||||
isolation_level: Literal["DEFERRED", "EXCLUSIVE", "IMMEDIATE"] | None = "DEFERRED",
|
||||
isolation_level: _IsolationLevel = "DEFERRED",
|
||||
check_same_thread: bool = True,
|
||||
*,
|
||||
factory: type[_ConnectionT],
|
||||
@@ -265,7 +266,7 @@ else:
|
||||
database: StrOrBytesPath,
|
||||
timeout: float = 5.0,
|
||||
detect_types: int = 0,
|
||||
isolation_level: Literal["DEFERRED", "EXCLUSIVE", "IMMEDIATE"] | None = "DEFERRED",
|
||||
isolation_level: _IsolationLevel = "DEFERRED",
|
||||
check_same_thread: bool = True,
|
||||
cached_statements: int = 128,
|
||||
uri: bool = False,
|
||||
@@ -275,7 +276,7 @@ else:
|
||||
database: StrOrBytesPath,
|
||||
timeout: float,
|
||||
detect_types: int,
|
||||
isolation_level: Literal["DEFERRED", "EXCLUSIVE", "IMMEDIATE"] | None,
|
||||
isolation_level: _IsolationLevel,
|
||||
check_same_thread: bool,
|
||||
factory: type[_ConnectionT],
|
||||
cached_statements: int = 128,
|
||||
@@ -286,7 +287,7 @@ else:
|
||||
database: StrOrBytesPath,
|
||||
timeout: float = 5.0,
|
||||
detect_types: int = 0,
|
||||
isolation_level: Literal["DEFERRED", "EXCLUSIVE", "IMMEDIATE"] | None = "DEFERRED",
|
||||
isolation_level: _IsolationLevel = "DEFERRED",
|
||||
check_same_thread: bool = True,
|
||||
*,
|
||||
factory: type[_ConnectionT],
|
||||
|
||||
Reference in New Issue
Block a user