mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Updated for __slots__
This commit is contained in:
parent
4673a239b8
commit
7084400dc6
23 changed files with 5 additions and 24 deletions
|
@ -25,7 +25,6 @@ from slpkg.models.models import session as Session
|
|||
class Packages(Configs):
|
||||
|
||||
def __init__(self, repository: str, data: dict, packages: list, flags: list, mode: str):
|
||||
__slots__ = 'repository', 'data', 'packages', 'flags', 'mode'
|
||||
super(Configs, self).__init__()
|
||||
self.data: dict = data
|
||||
self.packages: list = packages
|
||||
|
|
|
@ -10,7 +10,6 @@ class BinQueries:
|
|||
""" Queries class for the binary repositories. """
|
||||
|
||||
def __init__(self, repo: str):
|
||||
__slots__ = 'repo'
|
||||
self.repo: str = repo
|
||||
self.session = Session
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ from slpkg.repositories import Repositories
|
|||
class Required:
|
||||
""" Creates a list of dependencies with
|
||||
the right order to install. """
|
||||
__slots__ = ('data', 'name', 'repos', 'special_repos', 'repo')
|
||||
|
||||
def __init__(self, data: dict, name: str):
|
||||
__slots__ = 'data', 'name,'
|
||||
self.data: dict = data
|
||||
self.name: str = name
|
||||
self.repos = Repositories()
|
||||
|
|
|
@ -14,7 +14,6 @@ class Check(Configs):
|
|||
""" Some checks before proceed. """
|
||||
|
||||
def __init__(self, repository: str, data: dict):
|
||||
__slots__ = 'repository', 'data'
|
||||
super(Configs, self).__init__()
|
||||
self.data: dict = data
|
||||
self.repository = repository
|
||||
|
|
|
@ -18,8 +18,8 @@ class Md5sum:
|
|||
""" Checksum the sources. """
|
||||
|
||||
def __init__(self, flags: list):
|
||||
__slots__ = 'flags'
|
||||
self.flags: list = flags
|
||||
|
||||
self.ascii = Ascii()
|
||||
self.errors = Errors()
|
||||
self.utils = Utilities()
|
||||
|
|
|
@ -18,7 +18,6 @@ class Cleanings(Configs):
|
|||
""" Cleans the logs from packages. """
|
||||
|
||||
def __init__(self, flags: list):
|
||||
__slots__ = 'flags'
|
||||
super(Configs, self).__init__()
|
||||
self.flags: list = flags
|
||||
self.session = Session
|
||||
|
|
|
@ -12,7 +12,6 @@ class Dependees(Configs):
|
|||
""" Show which packages depend. """
|
||||
|
||||
def __init__(self, data: dict, packages: list, flags: list, repository: str):
|
||||
__slots__ = 'data', 'packages', 'flags'
|
||||
super(Configs, self).__init__()
|
||||
self.data: dict = data
|
||||
self.packages: list = packages
|
||||
|
|
|
@ -17,10 +17,10 @@ class Download(Configs):
|
|||
""" Download the slackbuilds with the sources only. """
|
||||
|
||||
def __init__(self, directory: Path, flags: list, repository: str):
|
||||
__slots__ = 'directory', 'flags'
|
||||
super(Configs, self).__init__()
|
||||
self.directory: Path = directory
|
||||
self.flags: list = flags
|
||||
self.repository: str = repository
|
||||
|
||||
self.repos = Repositories()
|
||||
self.utils = Utilities()
|
||||
|
@ -35,7 +35,7 @@ class Download(Configs):
|
|||
""" Download the package only. """
|
||||
packages: list = self.utils.apply_package_pattern(data, packages)
|
||||
|
||||
view = ViewMessage(self.flags, data)
|
||||
view = ViewMessage(self.flags, self.repository, data)
|
||||
view.download_packages(packages, self.directory)
|
||||
view.question()
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ from slpkg.error_messages import Errors
|
|||
class Downloader(Configs):
|
||||
|
||||
def __init__(self, path: Union[str, Path], urls: list, flags: list):
|
||||
__slots__ = 'path', 'urls', 'flags'
|
||||
super(Configs, self).__init__()
|
||||
self.path: Path = path
|
||||
self.urls: list = urls
|
||||
|
|
|
@ -12,7 +12,6 @@ class LoggingDeps:
|
|||
""" Logging installed dependencies. """
|
||||
|
||||
def __init__(self, repository: str, data: dict):
|
||||
__slots__ = 'repository', 'data'
|
||||
self.data: dict = data
|
||||
|
||||
self.utils = Utilities()
|
||||
|
|
|
@ -37,7 +37,6 @@ from slpkg.update_repository import UpdateRepository
|
|||
class Argparse(Configs):
|
||||
|
||||
def __init__(self, args: list):
|
||||
__slots__ = 'args'
|
||||
super(Configs).__init__()
|
||||
self.args: list = args
|
||||
self.flags: list = []
|
||||
|
|
|
@ -12,7 +12,6 @@ from pathlib import Path
|
|||
class NewConfigs:
|
||||
|
||||
def __init__(self, options: list):
|
||||
__slots__ = 'options'
|
||||
self.options: list = options
|
||||
self.etc_path: Path = Path('/etc/slpkg')
|
||||
self.slpkg_config: Path = Path(self.etc_path, 'slpkg.toml')
|
||||
|
|
|
@ -17,7 +17,6 @@ class RemovePackages(Configs):
|
|||
""" Removes installed packages. """
|
||||
|
||||
def __init__(self, packages: list, flags: list):
|
||||
__slots__ = 'packages', 'flags'
|
||||
super(Configs, self).__init__()
|
||||
self.packages: list = packages
|
||||
self.flags: list = flags
|
||||
|
|
|
@ -7,9 +7,9 @@ from typing import Generator
|
|||
class Requires:
|
||||
""" Creates a list of dependencies with
|
||||
the right order to install. """
|
||||
__slots__ = ('data', 'name')
|
||||
|
||||
def __init__(self, data: dict, name: str):
|
||||
__slots__ = 'data', 'name'
|
||||
self.data: dict = data
|
||||
self.name: str = name
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ class SBoQueries(Configs):
|
|||
""" Queries class for the sbo repository. """
|
||||
|
||||
def __init__(self, repository: str):
|
||||
__slots__ = 'repository'
|
||||
super(Configs, self).__init__()
|
||||
self.session = Session
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ class Slackbuilds(Configs):
|
|||
""" Download build and install the SlackBuilds. """
|
||||
|
||||
def __init__(self, repository: str, data: dict, slackbuilds: list, flags: list, mode: str):
|
||||
__slots__ = 'repository', 'data', 'slackbuilds', 'flags', 'mode'
|
||||
super(Configs, self).__init__()
|
||||
self.data = data
|
||||
self.slackbuilds: list = slackbuilds
|
||||
|
|
|
@ -11,7 +11,6 @@ class SearchPackage(Configs):
|
|||
""" Search packages from the repositories. """
|
||||
|
||||
def __init__(self, repository: str):
|
||||
__slots__ = 'repository'
|
||||
super(Configs, self).__init__()
|
||||
|
||||
self.utils = Utilities()
|
||||
|
|
|
@ -10,7 +10,6 @@ class Tracking(Configs):
|
|||
""" Tracking of the package dependencies. """
|
||||
|
||||
def __init__(self, flags: list, repository: str):
|
||||
__slots__ = 'flags', 'repository'
|
||||
super(Configs, self).__init__()
|
||||
self.flags: list = flags
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ class UpdateRepository(Configs):
|
|||
""" Deletes and install the data. """
|
||||
|
||||
def __init__(self, flags: list, repository: str):
|
||||
__slots__ = 'flags', 'repository'
|
||||
super(Configs, self).__init__()
|
||||
self.flags: list = flags
|
||||
self.repository: str = repository
|
||||
|
|
|
@ -15,7 +15,6 @@ class Upgrade(Configs):
|
|||
""" Upgrade the installed packages. """
|
||||
|
||||
def __init__(self, repository: str, data: dict):
|
||||
__slots__ = 'repository', 'data'
|
||||
super(Configs, self).__init__()
|
||||
self.repository = repository
|
||||
self.data: dict = data
|
||||
|
|
|
@ -7,7 +7,6 @@ from slpkg.configs import Configs
|
|||
class Help(Configs):
|
||||
|
||||
def __init__(self, command: str, flags: list):
|
||||
__slots__ = 'command', 'flags'
|
||||
super(Configs, self).__init__()
|
||||
self.command: str = command
|
||||
self.flags: list = flags
|
||||
|
|
|
@ -15,7 +15,6 @@ class ViewPackage(Configs):
|
|||
""" View the repository packages. """
|
||||
|
||||
def __init__(self, flags: list):
|
||||
__slots__ = 'flags'
|
||||
super(Configs, self).__init__()
|
||||
self.flags: list = flags
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ from slpkg.models.models import session as Session
|
|||
class ViewMessage(Configs):
|
||||
|
||||
def __init__(self, flags: list, repository: str, data=None):
|
||||
__slots__ = 'flags', 'data'
|
||||
super(Configs, self).__init__()
|
||||
self.flags: list = flags
|
||||
self.repository = repository
|
||||
|
|
Loading…
Reference in a new issue