mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +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:
committed by
GitHub
parent
3f54f7e3de
commit
359d4c095d
@@ -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