Skip to content

Commit

Permalink
refactor: remove redundant conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
otosky committed Dec 23, 2024
1 parent da65b42 commit d7793da
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions dlt/common/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,7 @@ def get_generic_type_argument_from_instance(
"""
orig_param_type = Any
if cls_ := getattr(instance, "__orig_class__", None):
if is_optional_type(cls_):
cls_ = extract_inner_type(cls_)

# instance of generic class
pass
cls_ = extract_inner_type(cls_)
elif bases_ := get_original_bases(instance.__class__):
# instance of class deriving from generic
cls_ = bases_[0]
Expand Down

0 comments on commit d7793da

Please sign in to comment.