Skip to content

Commit 6c8b938

Browse files
committed
Replace toml with tomllib
1 parent 4511cbe commit 6c8b938

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/ioi-task-format.typ

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ directly from `gen.toml`.
331331
#figure(
332332
```python
333333
#!/usr/bin/env python3
334-
import sys, toml
334+
import sys, tomllib
335335
336336
def run(f, st_name):
337337
# Constants from gen.toml (like MAXN) are available in globals()
@@ -340,8 +340,8 @@ directly from `gen.toml`.
340340
pass
341341
342342
if __name__ == "__main__":
343-
with open("gen.toml", "r") as f_toml:
344-
conf = toml.load(f_toml)
343+
with open("gen.toml", "rb") as f_toml:
344+
conf = tomllib.load(f_toml)
345345
# Load global constants
346346
globals().update({k: v for k, v in conf.items() if not isinstance(v, dict)})
347347
# Determine subtask name (passed as second argument by default)

0 commit comments

Comments
 (0)