We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83d5863 commit 3905ed7Copy full SHA for 3905ed7
sambacc/config.py
@@ -80,7 +80,13 @@ def _load_toml(source: typing.IO) -> JSONData:
80
else:
81
82
def _load_toml(source: typing.IO) -> JSONData:
83
- raise ConfigFormatUnsupported(ConfigFormat.TOML)
+ try:
84
+ import tomli
85
+ except ImportError:
86
+ raise ConfigFormatUnsupported(ConfigFormat.TOML)
87
+ if typing.TYPE_CHECKING:
88
+ assert isinstance(source, typing.BinaryIO)
89
+ return tomli.load(source)
90
91
92
def _load_yaml(source: typing.IO) -> JSONData:
0 commit comments