Skip to content

Commit

Permalink
Update ResultMetadata branch attribute to allow None values for detac…
Browse files Browse the repository at this point in the history
…hed head state
  • Loading branch information
fabianliebig committed Feb 7, 2025
1 parent a6a3705 commit abab2ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmarks/result/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import git
from attrs import define, field
from attrs.validators import instance_of
from attrs.validators import instance_of, optional
from cattrs.gen import make_dict_unstructure_fn

from benchmarks.serialization import BenchmarkSerialization, converter
Expand All @@ -26,7 +26,7 @@ class ResultMetadata(BenchmarkSerialization):
latest_baybe_tag: str = field(validator=instance_of(str), init=False)
"""The latest BayBE tag reachable in the ancestor commit history."""

branch: str = field(validator=instance_of(str), init=False)
branch: str | None = field(validator=optional(instance_of(str)), init=False)
"""The branch checked out during benchmark execution."""

@branch.default
Expand Down

0 comments on commit abab2ce

Please sign in to comment.