Skip to content

Commit 14434be

Browse files
committed
resolve annotations for 3.8+
1 parent efc936c commit 14434be

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mystbin/backend/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import argparse
24
import json
35
import os
@@ -26,6 +28,7 @@ def get_config() -> dict[str, dict[str, int | str]]:
2628

2729
return data
2830

31+
2932
if __name__ == "__main__":
3033
cfg = get_config()
3134
port = cast(int, cfg["site"]["backend_port"])
@@ -35,7 +38,7 @@ def get_config() -> dict[str, dict[str, int | str]]:
3538
parser.add_argument("--workers", "-w", nargs=1, default=os.cpu_count() or 1)
3639

3740
ns = parser.parse_args(sys.argv[1:])
38-
41+
3942
use_workers: bool = not ns.no_workers
4043
use_cli: bool = not ns.no_cli
4144
worker_count: int = ns.workers

0 commit comments

Comments
 (0)