Skip to content

Commit

Permalink
Add type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
SkypLabs committed Dec 13, 2024
1 parent 3e67d4f commit fb096c3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/faker_wifi_essid/wifi_essid.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
A Faker provider for Wi-Fi ESSIDs.
"""

from collections.abc import Callable

from faker.providers import BaseProvider

from .common_essids import COMMON_ESSIDS
Expand All @@ -14,7 +16,7 @@ class WifiESSID(BaseProvider):
A Faker provider for Wi-Fi ESSIDs.
"""

def common_essid(self):
def common_essid(self) -> str:
"""
Returns a random ESSID from a list of the most commonly used ones.
Expand All @@ -23,7 +25,7 @@ def common_essid(self):

return self.random_element(COMMON_ESSIDS)

def upc_default_essid(self):
def upc_default_essid(self) -> str:
"""
Generates a random ESSID similar to the default ones used by UPC.
Expand All @@ -32,7 +34,7 @@ def upc_default_essid(self):

return "UPC" + str(self.random_number(7, True))

def bbox_default_essid(self):
def bbox_default_essid(self) -> str:
"""
Generates a random ESSID similar to the default ones used by Bouygues
Telecom's Bbox.
Expand All @@ -41,13 +43,13 @@ def bbox_default_essid(self):
return self.hexify("Bbox-^^^^^^", upper=True)

# List of the different ESSID generators.
essid_generators = [
essid_generators: list[Callable] = [
bbox_default_essid,
common_essid,
upc_default_essid,
]

def wifi_essid(self):
def wifi_essid(self) -> str:
"""
Returns a random fake Wi-Fi essid.
"""
Expand Down

0 comments on commit fb096c3

Please sign in to comment.