Skip to content

Commit

Permalink
Fix return type of dbm.whichdb (#10989)
Browse files Browse the repository at this point in the history
It is `None` if the given file doesn't exist or isn't a database.
  • Loading branch information
tmke8 authored Nov 7, 2023
1 parent 3f54f7e commit 359d4c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/dbm/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...

0 comments on commit 359d4c0

Please sign in to comment.