Fix return type of dbm.whichdb (#10989)

It is `None` if the given file doesn't exist or isn't a database.
This commit is contained in:
Thomas M Kehrenberg
2023-11-07 12:49:39 +01:00
committed by GitHub
parent 3f54f7e3de
commit 359d4c095d

View File

@@ -90,5 +90,5 @@ class _error(Exception): ...
error: tuple[type[_error], type[OSError]]
def whichdb(filename: str) -> str: ...
def whichdb(filename: str) -> str | None: ...
def open(file: str, flag: _TFlags = "r", mode: int = 0o666) -> _Database: ...