Skip to content

Commit

Permalink
annotation type fixes (#15124)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzstoatzz authored Aug 28, 2024
1 parent a4367c4 commit fdd3c2c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/prefect/utilities/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def unwrap(self) -> T:
def rewrap(self, value: T) -> "BaseAnnotation[T]":
return type(self)(value)

def __eq__(self, other: object) -> bool:
if not type(self) == type(other):
def __eq__(self, other: "BaseAnnotation[T]") -> bool:
if type(self) is not type(other):
return False
return self.unwrap() == other.unwrap()

Expand Down Expand Up @@ -90,10 +90,11 @@ def unquote(self) -> T:
class Quote(quote):
def __init__(self, expr):
warnings.warn(
DeprecationWarning,
"Use of `Quote` is deprecated. Use `quote` instead.",
DeprecationWarning,
stacklevel=2,
)
super().__init__(expr)


class NotSet:
Expand Down

0 comments on commit fdd3c2c

Please sign in to comment.