Switch from PyTOML to tomlkit.
This commit is contained in:
parent
6d9fa0e718
commit
7c52896ad9
@ -1,6 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
import toml
|
import tomlkit
|
||||||
import discord
|
import discord
|
||||||
import logging
|
import logging
|
||||||
from discord import Message, TextChannel, DMChannel
|
from discord import Message, TextChannel, DMChannel
|
||||||
@ -76,7 +76,7 @@ class FjerkroaBot(commands.Bot):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def load_config(self, config_file: str = "config.toml"):
|
def load_config(self, config_file: str = "config.toml"):
|
||||||
with open(config_file, encoding='utf-8') as file:
|
with open(config_file, encoding='utf-8') as file:
|
||||||
return toml.load(file)
|
return tomlkit.load(file)
|
||||||
|
|
||||||
def channel_by_name(self,
|
def channel_by_name(self,
|
||||||
channel_name: Optional[str],
|
channel_name: Optional[str],
|
||||||
|
|||||||
@ -43,5 +43,4 @@ pytest = "*"
|
|||||||
setuptools = "*"
|
setuptools = "*"
|
||||||
wheel = "*"
|
wheel = "*"
|
||||||
watchdog = "*"
|
watchdog = "*"
|
||||||
toml = "*"
|
tomlkit = "*"
|
||||||
types-toml = "*"
|
|
||||||
|
|||||||
@ -8,6 +8,5 @@ pytest
|
|||||||
setuptools
|
setuptools
|
||||||
wheel
|
wheel
|
||||||
watchdog
|
watchdog
|
||||||
toml
|
tomlkit
|
||||||
types-toml
|
|
||||||
multiline
|
multiline
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user