Skip to content

Commit

Permalink
Black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
quintindunn committed Jun 28, 2024
1 parent 27c7379 commit 1cb99c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/crawler/crawleroptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ def __init__(self):


class DefaultCrawlerOptions(BaseCrawlerOptions):
def __init__(self, ignored_file_extensions_path: str = "./configs/ignored_file_extensions.txt"):
def __init__(
self,
ignored_file_extensions_path: str = "./configs/ignored_file_extensions.txt",
):
super().__init__()

self.ua: str = "OWS-CRAWLER/0.1-DEV (https://github.com/quintindunn/OWS)"
Expand Down
6 changes: 4 additions & 2 deletions src/crawler/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def _get_network_info() -> tuple[str, str]:
for iface, addrs in psutil.net_if_addrs().items():
for addr in addrs:
if addr.family == socket.AF_INET:
network_ip = IPv4Network(f"{addr.address}/{addr.netmask}", strict=False).network_address
network_ip = IPv4Network(
f"{addr.address}/{addr.netmask}", strict=False
).network_address
yield network_ip, addr.netmask


Expand Down Expand Up @@ -69,4 +71,4 @@ def is_host_private(host: str) -> bool:
:return: True if the host resolves to a private ip address.
"""
ip = _resolve_domain_to_ip(host)
return _is_ip_private(ip)
return _is_ip_private(ip)

0 comments on commit 1cb99c8

Please sign in to comment.