Skip to content

Commit 4127f32

Browse files
author
Vili
committed
Return right type
and renamed *nonprefix* to *noprefix*
1 parent 0988de8 commit 4127f32

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

helper/printer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def debug(message, *args, **kwargs) -> None:
5151
print_colored(message, Fore.LIGHTMAGENTA_EX, "[>]", *args, **kwargs)
5252

5353

54-
def nonprefix(message, *args, **kwargs) -> None:
54+
def noprefix(message, *args, **kwargs) -> None:
5555
print(message, *args, **kwargs)
5656

5757

helper/randomuser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ class GetUser:
440440
Return a random user agent from the list.
441441
"""
442442

443-
def __init__(self) -> str:
443+
def __init__(self) -> None:
444444
self.user_agent = random.choice(users)
445445

446446
def __str__(self) -> str:

helper/url_helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import json
1919
import os
2020
import sys
21+
from typing import LiteralString
2122

2223
from helper import printer
2324

@@ -42,7 +43,7 @@ def read_local_content(path):
4243

4344

4445
# I hate pyinstaller.
45-
def resource_path(relative_path) -> str:
46+
def resource_path(relative_path) -> LiteralString | str | bytes:
4647
if hasattr(sys, '_MEIPASS'):
4748
return os.path.join(sys._MEIPASS, relative_path)
4849
return os.path.join(os.path.abspath("."), relative_path)

utils/email_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def search(email) -> None:
3636
result = subprocess.run(["holehe", email], capture_output=True, text=True, check=True)
3737
output = _format_output(result.stdout)
3838
if output:
39-
printer.nonprefix(output)
40-
printer.nonprefix("Credits to megadose (Palenath) for holehe.")
39+
printer.noprefix(output)
40+
printer.noprefix("Credits to megadose (Palenath) for holehe.")
4141
else:
4242
printer.error("No results found..!")
4343
except FileNotFoundError:

0 commit comments

Comments
 (0)