mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Factorio: use orjson (#1809)
* Factorio: use orjson * Factorio: update orjson --------- Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import orjson
|
||||
import logging
|
||||
import os
|
||||
import string
|
||||
@@ -20,7 +20,7 @@ pool = ThreadPoolExecutor(1)
|
||||
|
||||
|
||||
def load_json_data(data_name: str) -> Union[List[str], Dict[str, Any]]:
|
||||
return json.loads(pkgutil.get_data(__name__, "data/" + data_name + ".json").decode())
|
||||
return orjson.loads(pkgutil.get_data(__name__, "data/" + data_name + ".json"))
|
||||
|
||||
|
||||
techs_future = pool.submit(load_json_data, "techs")
|
||||
|
@@ -1 +1,2 @@
|
||||
factorio-rcon-py>=2.0.1
|
||||
orjson>=3.9.7
|
||||
|
Reference in New Issue
Block a user