Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ns696 committed Jun 8, 2024
1 parent 14bc73e commit 2018186
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 55 deletions.
4 changes: 2 additions & 2 deletions pywhatkit/ascii_art.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def image_to_ascii_art(
img_path: str, output_file: Optional[str] = "pywhatkit_asciiart"
img_path: str, output_file: Optional[str] = "pywhatkit_asciiart"
) -> str:
"""Convert an Image to ASCII Art"""

Expand All @@ -24,7 +24,7 @@ def image_to_ascii_art(

new_pixels_count = len(new_pixels)
ascii_image = [
new_pixels[index: index + new_width]
new_pixels[index : index + new_width]
for index in range(0, new_pixels_count, new_width)
]
ascii_image = "\n".join(ascii_image)
Expand Down
2 changes: 1 addition & 1 deletion pywhatkit/handwriting.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def text_to_handwriting(
string: str, save_to: str = "pywhatkit.png", rgb: tuple = (0, 0, 0)
string: str, save_to: str = "pywhatkit.png", rgb: tuple = (0, 0, 0)
) -> None:
"""Convert the given String to Handwritten Characters"""

Expand Down
12 changes: 6 additions & 6 deletions pywhatkit/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@


def send_mail(
email_sender: str,
password: str,
subject: str,
message: Union[str, MIMEText],
email_receiver: str,
email_sender: str,
password: str,
subject: str,
message: Union[str, MIMEText],
email_receiver: str,
) -> None:
"""Send an Email"""

Expand Down Expand Up @@ -48,7 +48,7 @@ def send_mail(


def send_hmail(
email_sender: str, password: str, subject: str, html_code: str, email_receiver: str
email_sender: str, password: str, subject: str, html_code: str, email_receiver: str
) -> None:
"""Send an Email with HTML Code"""

Expand Down
3 changes: 1 addition & 2 deletions pywhatkit/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
if system().lower() in ("windows", "darwin"):
from PIL import ImageGrab


def take_screenshot(
file_name: str = "pywhatkit_screenshot", delay: int = 2, show: bool = True
file_name: str = "pywhatkit_screenshot", delay: int = 2, show: bool = True
) -> None:
"""Take Screenshot of the Screen"""

Expand Down
1 change: 1 addition & 0 deletions pywhatkit/remotekit.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ def start_server(port=8000, print_msg=True):
print("Print Ctrl+C to exit")
app.run(host="0.0.0.0", port=port)


# app.run(host='0.0.0.0')
#
#
Expand Down
88 changes: 44 additions & 44 deletions pywhatkit/whats.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ def set_frontmost_process(browser_name) -> None:


def sendwhatmsg_instantly(
phone_no: str,
message: str,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
phone_no: str,
message: str,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
) -> None:
"""Send WhatsApp Message Instantly"""

Expand Down Expand Up @@ -116,11 +116,11 @@ def sendwhatmsg_instantly(


def sendimg_or_video_immediately(
phone_no: str,
path: str,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
phone_no: str,
path: str,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
) -> None:
"""Send WhatsApp Message Instantly"""

Expand Down Expand Up @@ -193,13 +193,13 @@ def sendimg_or_video_immediately(


def sendwhatmsg(
phone_no: str,
message: Union[list, str],
time_hour: int,
time_min: int,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
phone_no: str,
message: Union[list, str],
time_hour: int,
time_min: int,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
) -> None:
"""Send a WhatsApp Message at a Certain Time"""
if not core.check_number(number=phone_no):
Expand Down Expand Up @@ -241,13 +241,13 @@ def sendwhatmsg(


def sendwhatmsg_to_group(
group_id: str,
message: str,
time_hour: int,
time_min: int,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
group_id: str,
message: str,
time_hour: int,
time_min: int,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
) -> None:
"""Send WhatsApp Message to a Group at a Certain Time"""

Expand Down Expand Up @@ -279,11 +279,11 @@ def sendwhatmsg_to_group(


def sendwhatmsg_to_group_instantly(
group_id: str,
message: str,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
group_id: str,
message: str,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
) -> None:
"""Send WhatsApp Message to a Group Instantly"""

Expand All @@ -296,13 +296,13 @@ def sendwhatmsg_to_group_instantly(


def sendwhatsmsg_to_all(
phone_nos: List[str],
message: str,
time_hour: int,
time_min: int,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
phone_nos: List[str],
message: str,
time_hour: int,
time_min: int,
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
):
for phone_no in phone_nos:
sendwhatmsg(
Expand All @@ -311,14 +311,14 @@ def sendwhatsmsg_to_all(


def sendwhats_image(
receiver: str,
img_path: str,
time_hour: int,
time_min: int,
caption: str = "",
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
receiver: str,
img_path: str,
time_hour: int,
time_min: int,
caption: str = "",
wait_time: int = 15,
tab_close: bool = False,
close_time: int = 3,
) -> None:
"""Send Image to a WhatsApp Contact or Group at a Certain Time"""

Expand Down

0 comments on commit 2018186

Please sign in to comment.