Use tomllib now that toml is in the standard library
This commit is contained in:
parent
c16b0d6c5f
commit
d0f4bd7d1e
2 changed files with 5 additions and 6 deletions
|
|
@ -30,7 +30,7 @@ import pygments
|
||||||
import pygments.lexers
|
import pygments.lexers
|
||||||
import pygments.styles
|
import pygments.styles
|
||||||
import termstr
|
import termstr
|
||||||
import toml
|
import tomllib
|
||||||
|
|
||||||
import eris
|
import eris
|
||||||
|
|
||||||
|
|
@ -456,10 +456,10 @@ elinks, git_diff, git_blame = None, None, None # For linters.
|
||||||
|
|
||||||
|
|
||||||
if "ERIS_CONFIG" in os.environ:
|
if "ERIS_CONFIG" in os.environ:
|
||||||
tools_toml = toml.load(os.environ["ERIS_CONFIG"])
|
tools_toml = tomllib.load(open(os.environ["ERIS_CONFIG"], "rb"))
|
||||||
else:
|
else:
|
||||||
with importlib.resources.open_text(eris, "tools.toml") as tools_toml_file:
|
with importlib.resources.open_binary(eris, "tools.toml") as tools_toml_file:
|
||||||
tools_toml = toml.load(tools_toml_file)
|
tools_toml = tomllib.load(tools_toml_file)
|
||||||
tools_for_extensions = tools_toml["tools_for_extensions"]
|
tools_for_extensions = tools_toml["tools_for_extensions"]
|
||||||
del tools_toml["tools_for_extensions"]
|
del tools_toml["tools_for_extensions"]
|
||||||
for tool_name, tool_toml in tools_toml.items():
|
for tool_name, tool_toml in tools_toml.items():
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@ dependencies = [
|
||||||
"pillow==11.2.1",
|
"pillow==11.2.1",
|
||||||
"pygments==2.19.1",
|
"pygments==2.19.1",
|
||||||
"pyinotify-elephant-fork==0.0.1",
|
"pyinotify-elephant-fork==0.0.1",
|
||||||
"termstr @ git+https://gitlab.com/ahamilton/eris@v2024.12.18#subdirectory=termstr",
|
"termstr @ git+https://gitlab.com/ahamilton/eris@v2024.12.18#subdirectory=termstr"
|
||||||
"toml==0.10.2",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue