Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion github_scripts/suite_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def get_suite_starttime(self) -> str:
starttime = row[0]
return starttime.split("+")[0]

def read_groups_run(self) -> str:
def read_groups_run(self) -> List[str]:
Copy link
Collaborator

@yaswant yaswant Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Various collection types from typing (List, Dict, etc) are now (Python 3.9+) considered legacy syntax in favour of built-in generic collection types (list, dict, etc).
https://docs.python.org/3/whatsnew/3.9.html#type-hinting-generics-in-standard-collections

We don't support anything for Python<3.9, do we? If we do, then I suggest we include from __future__ import annotations for backward compatibility, and use the build-in collection types.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There'll be quite a few to update, so let's change those in another PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to make an Issue for this so it doesn't get forgotten?

"""
Read in groups run as part of suite from the cylc database file
"""
Expand All @@ -341,6 +341,8 @@ def read_groups_run(self) -> str:
if row[0] in ("g", "group"):
groups = row[1].strip("[]'\"").split(",")
break
if groups is None:
groups = ["suite_default"]
return groups

def get_task_states(self) -> Dict[str, str]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Expand Down
2 changes: 1 addition & 1 deletion github_scripts/suite_report_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, suite_path: Path) -> None:
self.suite_starttime: str = self.get_suite_starttime()
self.workflow_id: str = self.get_workflow_id()
self.task_states: Dict[str, str] = self.get_task_states()
self.groups: str = self.read_groups_run()
self.groups: List[str] = self.read_groups_run()
self.rose_data: Dict[str, str] = self.read_rose_conf()
self.dependencies: Dict[str, Dict] = self.read_dependencies()
Comment on lines 76 to 79
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

..and here

self.primary_source: str = self.determine_primary_source()
Expand Down