Skip to content

Commit

Permalink
fix(format): Fix PythonVersion.has_literal_type for Python 3.10. (#868)
Browse files Browse the repository at this point in the history
Co-authored-by: Paweł Rubin <pawel.rubin@ocado.com>
  • Loading branch information
pawelrubin and Paweł Rubin authored Oct 17, 2022
1 parent 4642400 commit 5a8654b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datamodel_code_generator/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PythonVersion(Enum):

@property
def has_literal_type(self) -> bool:
return self.value >= self.PY_38.value # type: ignore
return self.value not in {self.PY_36.value, self.PY_37.value} # type: ignore


if TYPE_CHECKING:
Expand Down

0 comments on commit 5a8654b

Please sign in to comment.