code-battles-cli 1.2.4__tar.gz → 1.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: code-battles-cli
3
- Version: 1.2.4
3
+ Version: 1.2.6
4
4
  Summary: A CLI for competitors in any Code Battles event!
5
5
  Requires-Dist: requests>=2.32.3
6
6
  Requires-Dist: google-cloud-firestore>=2.19.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "code-battles-cli"
3
- version = "1.2.4"
3
+ version = "1.2.6"
4
4
  description = "A CLI for competitors in any Code Battles event!"
5
5
  dependencies = [
6
6
  "requests>=2.32.3",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "code-battles-cli"
3
- version = "1.2.4"
3
+ version = "1.2.6"
4
4
  description = "A CLI for competitors in any Code Battles event!"
5
5
  dependencies = [
6
6
  "requests>=2.32.3",
@@ -69,6 +69,7 @@ class SimulationResults:
69
69
  winner: str
70
70
  steps: int
71
71
  logs: list[LogEntry]
72
+ statistics: dict[str, float]
72
73
 
73
74
 
74
75
  @dataclass
@@ -255,7 +256,7 @@ class Client:
255
256
  on_step: Callable[[], None] | None = None,
256
257
  ) -> SimulationResults | str:
257
258
  while True:
258
- if p.poll() is not None:
259
+ if p.poll() is not None and p.returncode != 0:
259
260
  assert p.stderr is not None
260
261
  raise SimulationException(p.stderr.read(), p.returncode)
261
262
 
@@ -285,6 +286,7 @@ class Client:
285
286
  )
286
287
  for entry in output_json["logs"]
287
288
  ],
289
+ output_json.get("statistics", {}),
288
290
  )
289
291
 
290
292
  assert p.stderr is not None