mirror of
https://github.com/google/bumble.git
synced 2026-04-16 00:25:31 +00:00
Merge pull request #891 from a-detiste/main
This commit is contained in:
@@ -24,13 +24,18 @@ import dataclasses
|
||||
import functools
|
||||
import logging
|
||||
import secrets
|
||||
import sys
|
||||
from collections.abc import AsyncGenerator, Awaitable, Callable, Iterable, Sequence
|
||||
from typing import (
|
||||
Any,
|
||||
)
|
||||
|
||||
import click
|
||||
import tomli
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
import tomllib
|
||||
else:
|
||||
import tomli as tomllib
|
||||
|
||||
try:
|
||||
import lc3 # type: ignore # pylint: disable=E0401
|
||||
@@ -114,7 +119,7 @@ def parse_broadcast_list(filename: str) -> Sequence[Broadcast]:
|
||||
broadcasts: list[Broadcast] = []
|
||||
|
||||
with open(filename, "rb") as config_file:
|
||||
config = tomli.load(config_file)
|
||||
config = tomllib.load(config_file)
|
||||
for broadcast in config.get("broadcasts", []):
|
||||
sources = []
|
||||
for source in broadcast.get("sources", []):
|
||||
|
||||
@@ -37,7 +37,7 @@ dependencies = [
|
||||
"pyserial-asyncio >= 0.5; platform_system!='Emscripten'",
|
||||
"pyserial >= 3.5; platform_system!='Emscripten'",
|
||||
"pyusb >= 1.2; platform_system!='Emscripten'",
|
||||
"tomli ~= 2.2.1; platform_system!='Emscripten'",
|
||||
"tomli ~= 2.2.1; platform_system!='Emscripten' and python_version<'3.11'",
|
||||
"websockets >= 15.0.1; platform_system!='Emscripten'",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user