Skip to content

Commit b5441cc

Browse files
committed
Use empty string as no branch
1 parent a52681e commit b5441cc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

completion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def branches_from_devguide(devguide_dir: Path) -> list[str]:
2222

2323
def get_completion(
2424
clones_dir: str, repo: str
25-
) -> tuple[float, 'TranslatorsData', str | None, float]:
25+
) -> tuple[float, 'TranslatorsData', str, float]:
2626
clone_path = Path(clones_dir, 'translations', repo)
2727
for branch in branches_from_devguide(Path(clones_dir, 'devguide')) + [
2828
'master',
@@ -74,7 +74,7 @@ def get_completion(
7474

7575
change = completion - month_ago_completion
7676

77-
return completion, translators_data, branch or None, change
77+
return completion, translators_data, branch, change
7878

7979

8080
@dataclass(frozen=True)

generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def get_project_data(
6969
completion = 0.0
7070
translators_data = TranslatorsData(0, False)
7171
change = 0.0
72-
branch = None
72+
branch = ''
7373
return LanguageProjectData(
7474
language,
7575
repo,
@@ -88,7 +88,7 @@ def get_project_data(
8888
class LanguageProjectData:
8989
language: Language
9090
repository: str | None
91-
branch: str | None
91+
branch: str
9292
completion: float
9393
change: float
9494
translators: TranslatorsData

0 commit comments

Comments
 (0)