mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
Fixed for typing hints
This commit is contained in:
parent
ee23c5bfbf
commit
0766d508b7
4 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
4.7.4 - 04/04/2023
|
||||||
|
Fixed:
|
||||||
|
- Python typing hints
|
||||||
|
|
||||||
4.7.3 - 03/04/2023
|
4.7.3 - 03/04/2023
|
||||||
Fixed:
|
Fixed:
|
||||||
- Option -B for -u, update and -c, check-updates commands
|
- Option -B for -u, update and -c, check-updates commands
|
||||||
|
|
|
@ -24,7 +24,7 @@ class BinQueries(Configs):
|
||||||
if self.name in self.black.packages():
|
if self.name in self.black.packages():
|
||||||
self.name: str = ''
|
self.name: str = ''
|
||||||
|
|
||||||
def count_packages(self) -> list:
|
def count_packages(self) -> int:
|
||||||
""" Counts the number of the packages. """
|
""" Counts the number of the packages. """
|
||||||
count = self.session.query(
|
count = self.session.query(
|
||||||
BinariesTable.id).where(
|
BinariesTable.id).where(
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from typing import Generator
|
||||||
|
|
||||||
from slpkg.repositories import Repositories
|
from slpkg.repositories import Repositories
|
||||||
from slpkg.binaries.queries import BinQueries
|
from slpkg.binaries.queries import BinQueries
|
||||||
|
|
||||||
|
@ -13,7 +15,7 @@ class Required:
|
||||||
self.name: str = name
|
self.name: str = name
|
||||||
self.repo: str = repo
|
self.repo: str = repo
|
||||||
self.repos = Repositories()
|
self.repos = Repositories()
|
||||||
self.repo_package_names: list = BinQueries(
|
self.repo_package_names: Generator = BinQueries(
|
||||||
self.name, self.repo).all_package_names_by_repo()
|
self.name, self.repo).all_package_names_by_repo()
|
||||||
|
|
||||||
self.special_repos: list = [
|
self.special_repos: list = [
|
||||||
|
|
|
@ -29,14 +29,14 @@ class SBoQueries(Configs):
|
||||||
if self.repos.ponce_repo:
|
if self.repos.ponce_repo:
|
||||||
self.sbo_table = PonceTable
|
self.sbo_table = PonceTable
|
||||||
|
|
||||||
def count_packages(self):
|
def count_packages(self) -> int:
|
||||||
""" Counts the number of the packages. """
|
""" Counts the number of the packages. """
|
||||||
count = self.session.query(
|
count = self.session.query(
|
||||||
self.sbo_table.id).count()
|
self.sbo_table.id).count()
|
||||||
|
|
||||||
return count
|
return count
|
||||||
|
|
||||||
def repo_name(self):
|
def repo_name(self) -> str:
|
||||||
""" Returns the repo name by the table. """
|
""" Returns the repo name by the table. """
|
||||||
table = inspect(self.sbo_table)
|
table = inspect(self.sbo_table)
|
||||||
repo = self.repos.sbo_repo_name
|
repo = self.repos.sbo_repo_name
|
||||||
|
|
Loading…
Reference in a new issue