From 1879518e2bd27b5cf699e7e1f0ad16dddcc43b80 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Sat, 27 Jun 2020 11:56:04 +1000 Subject: [PATCH] Create WorkflowRun.timing namedtuple from the dict (#1587) To stop non-deterministic dictionary ordering ruining our day on Python 3.5, create the namedtuple using the keys of the dictionary. --- github/WorkflowRun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/WorkflowRun.py b/github/WorkflowRun.py index 05121c2316..c0bac8a503 100644 --- a/github/WorkflowRun.py +++ b/github/WorkflowRun.py @@ -233,8 +233,8 @@ def timing(self): :calls: `GET /repos/:owner/:repo/actions/runs/:run_id/timing `_ :rtype: namedtuple with billable and run_duration_ms members """ - timingdata = namedtuple("TimingData", ["billable", "run_duration_ms"]) headers, data = self._requester.requestJsonAndCheck("GET", self.url + "/timing") + timingdata = namedtuple("TimingData", data.keys()) return timingdata._make(data.values()) def _initAttributes(self):