Skip to content

Commit c829374

Browse files
chore: remove toml lib
1 parent 9ef6715 commit c829374

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

api_tabular/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
from pathlib import Path
33

4-
import toml
4+
import tomllib
55

66

77
class Configurator:
@@ -15,12 +15,14 @@ def __init__(self):
1515

1616
def configure(self):
1717
# load default settings
18-
configuration = toml.load(Path(__file__).parent / "config_default.toml")
18+
with open(Path(__file__).parent / "config_default.toml", "rb") as f:
19+
configuration = tomllib.load(f)
1920

2021
# override with local settings
2122
local_settings = os.environ.get("CSVAPI_SETTINGS", Path.cwd() / "config.toml")
2223
if Path(local_settings).exists():
23-
configuration.update(toml.load(local_settings))
24+
with open(local_settings, "rb") as f:
25+
configuration.update(tomllib.load(f))
2426

2527
# override with os env settings
2628
for config_key in configuration:

poetry.lock

Lines changed: 1 addition & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ aiohttp = "^3.8.4"
1313
aiohttp-cors = "0.7.0"
1414
aiohttp-swagger = "1.0.16"
1515
sentry-sdk = "^1.25.1"
16-
toml = "^0.10.2"
1716

1817
[tool.poetry.group.dev.dependencies]
1918
aiohttp-devtools = "^1.0.post0"

0 commit comments

Comments
 (0)