Skip to content

Commit

Permalink
fix type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gouline committed Nov 27, 2024
1 parent 9c1ea40 commit 0fdc23a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dbtmetabase/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from enum import Enum
from pathlib import Path
from typing import (
Any,
Iterable,
Mapping,
MutableMapping,
Expand Down Expand Up @@ -117,6 +118,7 @@ def _read_model(
ns=_META_NS,
)
description = meta.pop("description", manifest_model.get("description"))

return Model(
database=database,
schema=schema,
Expand Down Expand Up @@ -144,7 +146,8 @@ def _read_column(
fields=_COLUMN_META_FIELDS,
ns=_META_NS,
)
description = meta.get("description", manifest_column.get("description"))
description = meta.pop("description", manifest_column.get("description"))

column = Column(
name=manifest_column.get("name", ""),
description=description,
Expand Down Expand Up @@ -325,12 +328,14 @@ def _set_column_relationship(
)

@staticmethod
def _scan_fields(t: Mapping, fields: Iterable[str], ns: str) -> Mapping:
def _scan_fields(
t: Mapping, fields: Iterable[str], ns: str
) -> MutableMapping[str, Any]:
"""Reads meta fields from a schem object.
Args:
t (Mapping): Target to scan for fields.
fields (List): List of fields to accept.
fields (Iterable): List of fields to accept.
ns (str): Field namespace (separated by .).
Returns:
Expand Down

0 comments on commit 0fdc23a

Please sign in to comment.