mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-03 16:33:49 +08:00
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:
1 parent
3f54f7e3de
commit
359d4c095d
1 file changed
+1
-1
@@ -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: ...
|
||||
Reference in new issue
Block a user