Skip to content

Commit

Permalink
Fix pylint config and reformat
Browse files Browse the repository at this point in the history
Signed-off-by: rany2 <[email protected]>
  • Loading branch information
rany2 committed Feb 16, 2024
1 parent 09956e3 commit df6bac8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
5 changes: 3 additions & 2 deletions src/edge_tts/communicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Communicate package.
"""


import json
import re
import ssl
Expand Down Expand Up @@ -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.
Expand Down
7 changes: 3 additions & 4 deletions src/edge_tts/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Main package.
"""


import argparse
import asyncio
import sys
Expand Down Expand Up @@ -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"])
Expand Down

0 comments on commit df6bac8

Please sign in to comment.