Skip to content

Commit

Permalink
Update binary.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pirate authored Aug 23, 2024
1 parent af5db53 commit 87fbac0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pydantic_pkgr/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ def validate(self):
return self

@field_validator('loaded_abspath', mode='before')
def parse_abspath(cls, value: Any):
return bin_abspath(value)
def parse_abspath(cls, value: Any) -> Optional[HostBinPath]:
return bin_abspath(value) if value else None

@field_validator('loaded_version', mode='before')
def parse_version(cls, value: Any):
return value and SemVer(value)
def parse_version(cls, value: Any) -> Optional[SemVer]:
return SemVer(value) if value else None

@field_serializer('provider_overrides', when_used='json')
def serialize_overrides(self, provider_overrides: Dict[BinProviderName, ProviderLookupDict]) -> Dict[BinProviderName, Dict[str, str]]:
Expand Down

0 comments on commit 87fbac0

Please sign in to comment.