Fixed D401 pydocstyle error

This commit is contained in:
Dimitris Zlatanidis 2024-05-21 22:59:00 +03:00
parent a638f46441
commit 4b6f3054e1

View file

@ -45,7 +45,7 @@ class CheckUpdates(Configs): # pylint: disable=[R0902]
('-B', '--progress-bar'), flags)
def check_the_repositories(self, queue: str = None) -> None:
"""Saves checks to a dictionary.
"""Save checks to a dictionary.
Args:
queue (str, optional): Puts attributes to the queue.
@ -62,7 +62,7 @@ class CheckUpdates(Configs): # pylint: disable=[R0902]
queue.put(self.error_connected)
def save_the_compares(self, repo: str) -> None:
"""Saves compares to a dictionary.
"""Save compares to a dictionary.
Args:
repo (str): Repository name.
@ -86,7 +86,7 @@ class CheckUpdates(Configs): # pylint: disable=[R0902]
local_chg_txt, repo_chg_txt)
def compare_the_changelogs(self, local_chg_txt: Path, repo_chg_txt: str) -> bool:
"""Compares the two ChangeLog files for changes.
"""Compare the two ChangeLog files for changes.
Args:
local_chg_txt (Path): Path to local ChangeLog file.
@ -128,18 +128,18 @@ class CheckUpdates(Configs): # pylint: disable=[R0902]
return local_size != repo_size
def check_for_error_connected(self) -> None:
"""Checks for error connected and prints a message."""
"""Check for error connected and prints a message."""
if self.error_connected:
print(f'\n{self.endc}Failed connected to the mirrors:\n')
for repo in self.error_connected:
print(f'{self.red}>{self.endc} {repo}')
def set_http_proxy_server(self) -> None:
"""Sets for HTTP proxy server."""
"""Set for HTTP proxy server."""
self.http = ProxyManager(f'{self.proxy_address}', headers=self.proxy_default_headers)
def set_socks_proxy_server(self) -> None:
"""Sets for proxy server."""
"""Set for proxy server."""
try: # Try to import PySocks if it's installed.
from urllib3.contrib.socks import SOCKSProxyManager # pylint: disable=[W0621,C0415]
except (ModuleNotFoundError, ImportError) as error:
@ -148,7 +148,7 @@ class CheckUpdates(Configs): # pylint: disable=[R0902]
self.http = SOCKSProxyManager(f'{self.proxy_address}', headers=self.proxy_default_headers)
def view_messages(self) -> None:
"""Prints for update messages."""
"""Print for update messages."""
repo_for_update: list = []
for repo, comp in self.compare.items():
if comp:
@ -177,7 +177,7 @@ class CheckUpdates(Configs): # pylint: disable=[R0902]
print()
def updates(self) -> dict:
"""Calls methods in parallel with progress tool or single.
"""Call methods in parallel with progress tool or single.
Returns:
dict: Description