Skip to content

Commit

Permalink
use is not for type comparison instead of != (#15253)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzstoatzz authored Sep 6, 2024
1 parent 2b994af commit c0b2e47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/prefect/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,9 @@ class BaseResult(BaseModel, abc.ABC, Generic[R]):
type: str

def __init__(self, **data: Any) -> None:
type_string = get_dispatch_key(self) if type(self) != BaseResult else "__base__"
type_string = (
get_dispatch_key(self) if type(self) is not BaseResult else "__base__"
)
data.setdefault("type", type_string)
super().__init__(**data)

Expand Down

0 comments on commit c0b2e47

Please sign in to comment.