Skip to content

Commit

Permalink
Improve typing of ContextMeta.__new__
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm committed Aug 31, 2023
1 parent 5ba052c commit cac8479
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/dbt/context/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import json
import os
from typing import Any, Dict, NoReturn, Optional, Mapping, Iterable, Set, List
Expand Down Expand Up @@ -109,10 +111,10 @@ def contextproperty(value):


class ContextMeta(type):
def __new__(mcls, name, bases, dct):
context_members = {}
context_attrs = {}
new_dct = {}
def __new__(mcls, name, bases, dct: Dict[str, Any]) -> ContextMeta:
context_members: Dict[str, Any] = {}
context_attrs: Dict[str, Any] = {}
new_dct: Dict[str, Any] = {}

for base in bases:
context_members.update(getattr(base, "_context_members_", {}))
Expand Down

0 comments on commit cac8479

Please sign in to comment.