Skip to content

Commit

Permalink
Add Optional[Dict] annotation to request_kwargs
Browse files Browse the repository at this point in the history
  - Code review for ioos#280
  • Loading branch information
vinisalazar committed Nov 22, 2022
1 parent 9cb2173 commit 114990a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions erddapy/core/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
XArray, Iris, etc. objects.
"""

from typing import Dict
from typing import Dict, Optional

import iris
import pandas as pd
Expand All @@ -16,7 +16,7 @@
from erddapy.core.url import urlopen


def to_pandas(url: str, requests_kwargs: Dict = None, **kw) -> pd.DataFrame:
def to_pandas(url: str, requests_kwargs: Optional[Dict] = None, **kw) -> pd.DataFrame:
"""
Convert a URL to Pandas DataFrame.
Expand Down Expand Up @@ -51,7 +51,7 @@ def to_ncCF(url: str, protocol: str = None, **kw) -> Dataset:


def to_xarray(
url: str, response="opendap", requests_kwargs: Dict = None, **kw
url: str, response="opendap", requests_kwargs: Optional[Dict] = None, **kw
) -> xr.Dataset:
"""
Convert a URL to an xarray dataset.
Expand All @@ -71,7 +71,7 @@ def to_xarray(
return xr.open_dataset(xr.backends.NetCDF4DataStore(nc), **kw)


def to_iris(url: str, requests_kwargs: Dict = None, **kw):
def to_iris(url: str, requests_kwargs: Optional[Dict] = None, **kw):
"""
Convert a URL to an iris CubeList.
Expand Down

0 comments on commit 114990a

Please sign in to comment.