From 266aa3b6ca160b87b940d18ed5b4c18576695ee6 Mon Sep 17 00:00:00 2001 From: shawnbrown Date: Mon, 12 Sep 2022 05:47:54 -0400 Subject: [PATCH] sqlite3: allow passing None for the func parameter of create_function (#8728) --- stdlib/sqlite3/dbapi2.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/sqlite3/dbapi2.pyi b/stdlib/sqlite3/dbapi2.pyi index fbd1a10ae..189e796de 100644 --- a/stdlib/sqlite3/dbapi2.pyi +++ b/stdlib/sqlite3/dbapi2.pyi @@ -318,10 +318,10 @@ class Connection: def create_collation(self, __name: str, __callback: Callable[[str, str], int | SupportsIndex] | None) -> None: ... if sys.version_info >= (3, 8): def create_function( - self, name: str, narg: int, func: Callable[..., _SqliteData], *, deterministic: bool = ... + self, name: str, narg: int, func: Callable[..., _SqliteData] | None, *, deterministic: bool = ... ) -> None: ... else: - def create_function(self, name: str, num_params: int, func: Callable[..., _SqliteData]) -> None: ... + def create_function(self, name: str, num_params: int, func: Callable[..., _SqliteData] | None) -> None: ... @overload def cursor(self, cursorClass: None = ...) -> Cursor: ...