Skip to content

Commit

Permalink
darglint wants Raises in docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
aecorn committed Feb 23, 2024
1 parent b49479a commit 081d89a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/statbank/apidata.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def apidata(
Returns:
pd.DataFrame: The table-content
Raises:
ValueError: If the first parameter is not recognized as a statbank ID or a direct url.
"""
if payload is None:
payload_now: QueryWholeType = {
Expand Down Expand Up @@ -102,6 +105,9 @@ def apidata_query_all(id_or_url: str = "") -> QueryWholeType:
Returns:
QueryWholeType: The prepared query based on all the codes in the table.
Raises:
ValueError: If the parameter is not a valid statbank ID or a direct url.
"""
if len(id_or_url) == STATBANK_TABLE_ID_LENGTH and id_or_url.isdigit():
url = f"https://data.ssb.no/api/v0/no/table/{id_or_url}/"
Expand Down
3 changes: 3 additions & 0 deletions src/statbank/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ def transfer(self, headers: dict[str, str] | None = None) -> None:
Args:
headers (dict[str, str] | None): Mostly for internal use by the package.
Needs to be a finished compiled headers for a request including Authorization.
Raises:
ValueError: If the transfer is already transferred.
"""
# In case transfer has already happened, dont transfer again
if self.oppdragsnummer:
Expand Down

0 comments on commit 081d89a

Please sign in to comment.