Skip to content

Commit

Permalink
Add return value to AdapterContainer.__init__ and AdapterMeta.__new__ (
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank authored Aug 30, 2023
1 parent fc1a14a commit 72898c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20230830-140231.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Mypy errors - adapters/factory.py
time: 2023-08-30T14:02:31.519929-04:00
custom:
Author: gshank
Issue: "8387"
2 changes: 1 addition & 1 deletion core/dbt/adapters/base/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class AdapterMeta(abc.ABCMeta):
_available_: FrozenSet[str]
_parse_replacements_: Dict[str, Callable]

def __new__(mcls, name, bases, namespace, **kwargs):
def __new__(mcls, name, bases, namespace, **kwargs) -> "AdapterMeta":
# mypy does not like the `**kwargs`. But `ABCMeta` itself takes
# `**kwargs` in its argspec here (and passes them to `type.__new__`.
# I'm not sure there is any benefit to it after poking around a bit,
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/adapters/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


class AdapterContainer:
def __init__(self):
def __init__(self) -> None:
self.lock = threading.Lock()
self.adapters: Dict[str, Adapter] = {}
self.plugins: Dict[str, AdapterPlugin] = {}
Expand Down

0 comments on commit 72898c7

Please sign in to comment.