Skip to content

Commit 62ed774

Browse files
fix: restore InterpolatedString equality comparison with non-InterpolatedString objects
Co-Authored-By: Aaron <AJ> Steers <[email protected]>
1 parent 6570bfc commit 62ed774

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

airbyte_cdk/sources/declarative/interpolation/interpolated_string.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@ def eval(self, config: Config, **kwargs: Any) -> Any:
5656
)
5757

5858
def __eq__(self, other: Any) -> bool:
59-
if not isinstance(other, InterpolatedString):
59+
if isinstance(other, InterpolatedString):
60+
return self.string == other.string and self.default == other.default
61+
try:
62+
return self.string == str(other)
63+
except (ValueError, TypeError):
6064
return False
61-
return self.string == other.string and self.default == other.default
6265

6366
@classmethod
6467
def create(

0 commit comments

Comments
 (0)