dbt-labs / dbt-adapters

Apache License 2.0
17 stars 20 forks source link

Update type hints for `get_adapter_constraint_support` #254

Open dbeatty10 opened 3 weeks ago

dbeatty10 commented 3 weeks ago

resolves #253

Problem

get_adapter_constraint_support returns CONSTRAINT_SUPPORT which is a dictionary of string keys and string values. But the type hint says List[str].

Solution

Update the type hint to be Dict[str, str].

Checklist

dbeatty10 commented 3 weeks ago

After making the suggested change, getting this error from mypy in CI:

dbt/adapters/factory.py:255: error: Incompatible return value type (got
"dict[str, str]", expected "list[str]")  [return-value]
        return FACTORY.get_adapter_constraint_support(name)