Fix pylint config and reformat

Signed-off-by: rany2 <rany2@riseup.net>
This commit is contained in:
rany2
2024-02-16 18:05:02 +02:00
parent 09956e3a20
commit df6bac8b54
3 changed files with 8 additions and 8 deletions

View File

@@ -307,8 +307,8 @@ min-public-methods=2
[EXCEPTIONS]
# Exceptions that will emit a warning when caught.
overgeneral-exceptions=BaseException,
Exception
overgeneral-exceptions=builtins.BaseException,
builtins.Exception
[FORMAT]

View File

@@ -2,7 +2,6 @@
Communicate package.
"""
import json
import re
import ssl
@@ -152,7 +151,9 @@ def split_text_by_byte_length(
yield new_text
def mkssml(text: Union[str, bytes], voice: str, rate: str, volume: str, pitch: str) -> str:
def mkssml(
text: Union[str, bytes], voice: str, rate: str, volume: str, pitch: str
) -> str:
"""
Creates a SSML string from the given parameters.

View File

@@ -2,7 +2,6 @@
Main package.
"""
import argparse
import asyncio
import sys
@@ -60,9 +59,9 @@ async def _run_tts(args: Any) -> None:
pitch=args.pitch,
)
subs: SubMaker = SubMaker()
with open(
args.write_media, "wb"
) if args.write_media else sys.stdout.buffer as audio_file:
with (
open(args.write_media, "wb") if args.write_media else sys.stdout.buffer
) as audio_file:
async for chunk in tts.stream():
if chunk["type"] == "audio":
audio_file.write(chunk["data"])