mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Fixed pydocstyle errors
This commit is contained in:
parent
4b6f3054e1
commit
cbf0c629fd
1 changed files with 16 additions and 18 deletions
|
@ -301,7 +301,7 @@ class Menu(Configs): # pylint: disable=[R0902]
|
|||
self.choose = Choose(self.repository)
|
||||
|
||||
def check_for_repositories(self) -> None:
|
||||
"""Checks a combination for binaries use repositories only and if repository exists."""
|
||||
"""Check a combination for binaries use repositories only and if repository exists."""
|
||||
except_options: tuple = (
|
||||
'-s', 'search',
|
||||
'-U', 'upgrade'
|
||||
|
@ -317,7 +317,7 @@ class Menu(Configs): # pylint: disable=[R0902]
|
|||
self.usage.help_minimal(f"{self.prog_name}: repository '{self.repository}' is disabled")
|
||||
|
||||
def invalid_options(self) -> None:
|
||||
"""Checks for invalid options."""
|
||||
"""Check for invalid options."""
|
||||
invalid, commands, repeat = [], [], []
|
||||
|
||||
for arg in self.args:
|
||||
|
@ -353,12 +353,9 @@ class Menu(Configs): # pylint: disable=[R0902]
|
|||
self.usage.help_minimal(f"{self.prog_name}: invalid options '{','.join(invalid)}'")
|
||||
|
||||
def split_options(self) -> None:
|
||||
"""Split options and commands, like: -iyjR.
|
||||
"""Split options and commands.
|
||||
|
||||
slpkg -jyiR package
|
||||
|
||||
Put the command first and options after.
|
||||
Result: ['-i', '-y', '-j', '-R']
|
||||
Put the command first and options after.
|
||||
"""
|
||||
for args in self.args:
|
||||
if args[0] == '-' and args[:2] != '--' and len(args) >= 3 and '=' not in args:
|
||||
|
@ -374,9 +371,8 @@ class Menu(Configs): # pylint: disable=[R0902]
|
|||
def split_options_from_args(self) -> None:
|
||||
"""Split options from arguments.
|
||||
|
||||
slpkg -d package --directory=/path/to/download
|
||||
|
||||
Split the option ['--directory'] and ['/path/to/download/'].
|
||||
slpkg -d package --directory=/path/to/download
|
||||
Split the option ['--directory'] and ['/path/to/download/'].
|
||||
"""
|
||||
remove_args: list = []
|
||||
|
||||
|
@ -426,7 +422,7 @@ class Menu(Configs): # pylint: disable=[R0902]
|
|||
self.args: list = new_args
|
||||
|
||||
def is_file_list_packages(self) -> list:
|
||||
"""Checks if the arg is filelist.pkgs."""
|
||||
"""Check if the arg is filelist.pkgs."""
|
||||
if self.args[1].endswith(self.file_list_suffix):
|
||||
file = Path(self.args[1])
|
||||
packages: list = list(self.utils.read_packages_from_file(file))
|
||||
|
@ -502,7 +498,7 @@ class Menu(Configs): # pylint: disable=[R0902]
|
|||
self.usage.help_short(1)
|
||||
|
||||
def repo_info(self) -> None:
|
||||
"""Prints repositories information.
|
||||
"""Print repositories information.
|
||||
|
||||
Raises:
|
||||
SystemExit: Exit code 0.
|
||||
|
@ -514,7 +510,7 @@ class Menu(Configs): # pylint: disable=[R0902]
|
|||
self.usage.help_short(1)
|
||||
|
||||
def build(self) -> None:
|
||||
"""Builds slackbuilds with dependencies without install.
|
||||
"""Build slackbuilds with dependencies without install.
|
||||
|
||||
Raises:
|
||||
SystemExit: Exit code 0.
|
||||
|
@ -543,7 +539,7 @@ class Menu(Configs): # pylint: disable=[R0902]
|
|||
self.usage.help_short(1)
|
||||
|
||||
def install(self) -> None:
|
||||
"""Builds and install packages with dependencies.
|
||||
"""Build and install packages with dependencies.
|
||||
|
||||
Raises:
|
||||
SystemExit: Exit code 0.
|
||||
|
@ -661,7 +657,7 @@ class Menu(Configs): # pylint: disable=[R0902]
|
|||
self.usage.help_short(1)
|
||||
|
||||
def search(self) -> None:
|
||||
"""Searching packages to the repositories.
|
||||
"""Search packages from the repositories.
|
||||
|
||||
Raises:
|
||||
SystemExit: Exit code 0.
|
||||
|
@ -728,8 +724,10 @@ class Menu(Configs): # pylint: disable=[R0902]
|
|||
|
||||
|
||||
class SubMenu:
|
||||
"""Submenu that separate from the main menu because of
|
||||
have no options to manage here."""
|
||||
"""Submenu that separate from the main menu.
|
||||
|
||||
Because of have no options to manage here.
|
||||
"""
|
||||
|
||||
def __init__(self, args: list):
|
||||
self.args: list = args
|
||||
|
@ -738,7 +736,7 @@ class SubMenu:
|
|||
self.clean = Cleanings()
|
||||
|
||||
def help(self) -> None:
|
||||
"""Prints help menu and exit."""
|
||||
"""Print help menu and exit."""
|
||||
if len(self.args) == 1:
|
||||
self.usage.help(0)
|
||||
self.usage.help_short(1)
|
||||
|
|
Loading…
Reference in a new issue