Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make Metadata a dataclass #109

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dataretrieval/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import requests
import dataretrieval
from dataretrieval.codes import tz

from dataclasses import dataclass

def to_str(listlike, delimiter=','):
"""Translates list-like objects into strings.
Expand Down Expand Up @@ -135,7 +135,7 @@ def update_merge(left, right, na_only=False, on=None, **kwargs):

return df


@dataclass
class Metadata:
"""Custom class for metadata.
"""
Expand Down Expand Up @@ -234,3 +234,4 @@ def __init__(self, url):

def __str__(self):
return "No sites/data found using the selection criteria specified in url: {}".format(self.url)