Skip to content

Commit

Permalink
More Python 3.8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
peterallenwebb committed Aug 1, 2024
1 parent 3c8bcd4 commit 098c9ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dbt_common/contracts/util.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import dataclasses
from typing import Any, Self
from typing import Any


# TODO: remove from dbt_common.contracts.util:: Replaceable + references
class Replaceable:
def replace(self, **kwargs: Any) -> Self:
def replace(self, **kwargs: Any):
return dataclasses.replace(self, **kwargs) # type: ignore


class Mergeable(Replaceable):
def merged(self, *args: Self) -> Self:
def merged(self, *args):
"""Perform a shallow merge, where the last non-None write wins. This is
intended to merge dataclasses that are a collection of optional values.
"""
Expand Down

0 comments on commit 098c9ea

Please sign in to comment.