diff --git a/dbtmetabase/__main__.py b/dbtmetabase/__main__.py index ab9298a..e225d9a 100644 --- a/dbtmetabase/__main__.py +++ b/dbtmetabase/__main__.py @@ -6,8 +6,8 @@ import click import yaml -from dbtmetabase.core import DbtMetabase -from dbtmetabase.format import Filter, setup_logging +from .core import DbtMetabase +from .format import Filter, setup_logging def _click_list_option_kwargs() -> Mapping[str, Any]: diff --git a/dbtmetabase/metabase.py b/dbtmetabase/metabase.py index 367bec2..5e66de9 100644 --- a/dbtmetabase/metabase.py +++ b/dbtmetabase/metabase.py @@ -167,6 +167,10 @@ def find_dashboard(self, uid: str) -> Optional[Mapping]: return None raise + def format_dashboard_url(self, uid: str) -> str: + """Formats URL link to a dashboard.""" + return f"{self.url}/dashboard/{uid}" + def find_user(self, uid: str) -> Optional[Mapping]: """Finds user by ID or returns none.""" try: @@ -177,10 +181,6 @@ def find_user(self, uid: str) -> Optional[Mapping]: return None raise - def format_dashboard_url(self, uid: str) -> str: - """Formats URL link to a dashboard.""" - return f"{self.url}/dashboard/{uid}" - def update_table(self, uid: str, body: Mapping) -> Mapping: """Posts update to an existing table.""" return dict(self._api("put", f"/api/table/{uid}", json=body))