Skip to content

Commit 059a0e6

Browse files
committed
Let query be optional and set '' as default
1 parent 7549d7e commit 059a0e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pybliometrics/sciencedirect/sciencedirect_search.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def results(self) -> Optional[list]:
6565
return out or None
6666

6767
def __init__(self,
68-
query: str = '',
68+
query: Optional[str] = None,
6969
refresh: Union[bool, int] = False,
7070
view: Optional[str] = None,
7171
verbose: bool = False,
@@ -127,6 +127,7 @@ def __init__(self,
127127
if not (query or kwds):
128128
msg = "The query is empty. Please provide either a query string or keyword arguments."
129129
raise ValueError(msg)
130+
query = query or ''
130131

131132
if view:
132133
check_parameter_value(view, VIEWS["ScienceDirectSearch"], "view")

0 commit comments

Comments
 (0)