Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 14, 2024
1 parent 3a5115f commit 9154032
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion datamodel_code_generator/parser/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,11 @@ def __apply_discriminator_type(
) != property_name:
continue
literals = discriminator_field.data_type.literals
if len(literals) == 1 and literals[0] == type_names[0] if type_names else None:
if (
len(literals) == 1 and literals[0] == type_names[0]
if type_names
else None
):
has_one_literal = True
continue
for (
Expand Down

0 comments on commit 9154032

Please sign in to comment.