Skip to content

Commit e610897

Browse files
committed
use setuptool license class in pydantic model
1 parent 0facd95 commit e610897

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/somesy/pyproject/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ class License(BaseModel):
122122

123123
model_config = dict(validate_assignment=True)
124124

125-
file: Optional[Path]
126-
text: Optional[LicenseEnum]
125+
file: Optional[Path] = None
126+
text: Optional[LicenseEnum] = None
127127

128128
@model_validator(mode="before")
129129
@classmethod
@@ -161,7 +161,7 @@ class SetuptoolsConfig(BaseModel):
161161
]
162162
description: str
163163
readme: Optional[Union[Path, List[Path], File]] = None
164-
license: Optional[Union[LicenseEnum, List[LicenseEnum]]] = Field(
164+
license: Optional[License] = Field(
165165
None, description="An SPDX license identifier."
166166
)
167167
authors: Optional[List[STPerson]] = None

0 commit comments

Comments
 (0)