Added docs and typing in function declarations

This commit is contained in:
HallowedDust5 committed 2022-06-21 22:58:33 -04:00
1 parent b38184bc32
commit 07466097a3
6 files changed
+68 -15

No files matched your search

+11 -6
View File
@@ -1,12 +1,17 @@
import re
def sanitize_text(text):
"""
Sanitizes the text for tts.
What gets removed:
- following characters`^_~@!&;#:-%“”‘"%*/{}[]()\|<>?=+`
- any http or https links
def sanitize_text(text: str) -> str:
"""Sanitizes the text for tts.
What gets removed:
- following characters`^_~@!&;#:-%“”‘"%*/{}[]()\|<>?=+`
- any http or https links
Args:
text (str): Text to be sanitized
Returns:
str: Sanitized text
"""
# remove any urls from the text