Skip to content

Commit

Permalink
Fix the code to satisfy mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatal1ty committed Mar 31, 2024
1 parent ad0d065 commit 78a1bd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mashumaro/core/meta/code/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,13 +627,14 @@ def get_discriminator(
if look_in_parents:
classes = self.cls.__mro__
else:
classes = [self.cls]
classes = (self.cls,)
for cls in classes:
discriminator = self.get_config(
cls, look_in_parents=False
).discriminator
if discriminator:
return discriminator
return None

def get_pack_method_flags(
self,
Expand Down

0 comments on commit 78a1bd3

Please sign in to comment.