mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-06-28 06:41:43 +00:00
small docs update
This commit is contained in:
@ -56,7 +56,7 @@ class Status(Handler):
|
||||
StatusPrinter(service_status.status).print(args.info)
|
||||
if args.package:
|
||||
packages: Iterable[Tuple[Package, BuildStatus]] = sum(
|
||||
[client.get(base) for base in args.package],
|
||||
(client.get(base) for base in args.package),
|
||||
start=[])
|
||||
else:
|
||||
packages = client.get(None)
|
||||
|
@ -77,7 +77,7 @@ class Versions(Handler):
|
||||
keys.extend(portion)
|
||||
portion = {
|
||||
key
|
||||
for key in sum([dependencies_by_key(key) for key in portion], start=[])
|
||||
for key in sum((dependencies_by_key(key) for key in portion), start=[])
|
||||
if key not in keys and key in resources
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ class Auth:
|
||||
return OAuth(configuration, database)
|
||||
return cls(configuration)
|
||||
|
||||
async def check_credentials(self, username: Optional[str], password: Optional[str]) -> bool: # pylint: disable=no-self-use
|
||||
async def check_credentials(self, username: Optional[str], password: Optional[str]) -> bool:
|
||||
"""
|
||||
validate user password
|
||||
|
||||
@ -103,7 +103,7 @@ class Auth:
|
||||
del username, password
|
||||
return True
|
||||
|
||||
async def known_username(self, username: Optional[str]) -> bool: # pylint: disable=no-self-use
|
||||
async def known_username(self, username: Optional[str]) -> bool:
|
||||
"""
|
||||
check if user is known
|
||||
|
||||
@ -116,7 +116,7 @@ class Auth:
|
||||
del username
|
||||
return True
|
||||
|
||||
async def verify_access(self, username: str, required: UserAccess, context: Optional[str]) -> bool: # pylint: disable=no-self-use
|
||||
async def verify_access(self, username: str, required: UserAccess, context: Optional[str]) -> bool:
|
||||
"""
|
||||
validate if user has access to requested resource
|
||||
|
||||
|
@ -220,7 +220,7 @@ class Configuration(configparser.RawConfigParser):
|
||||
}
|
||||
|
||||
# pylint and mypy are too stupid to find these methods
|
||||
# pylint: disable=missing-function-docstring,multiple-statements,unused-argument,no-self-use
|
||||
# pylint: disable=missing-function-docstring,multiple-statements,unused-argument
|
||||
def getlist(self, *args: Any, **kwargs: Any) -> List[str]: ...
|
||||
|
||||
def getpath(self, *args: Any, **kwargs: Any) -> Path: ...
|
||||
|
@ -44,7 +44,7 @@ class Printer:
|
||||
continue
|
||||
log_fn(f"\t{prop.name}{separator}{prop.value}")
|
||||
|
||||
def properties(self) -> List[Property]: # pylint: disable=no-self-use
|
||||
def properties(self) -> List[Property]:
|
||||
"""
|
||||
convert content into printable data
|
||||
|
||||
|
@ -60,7 +60,7 @@ class Client:
|
||||
status(BuildStatusEnum): current package build status
|
||||
"""
|
||||
|
||||
def get(self, base: Optional[str]) -> List[Tuple[Package, BuildStatus]]: # pylint: disable=no-self-use
|
||||
def get(self, base: Optional[str]) -> List[Tuple[Package, BuildStatus]]:
|
||||
"""
|
||||
get package status
|
||||
|
||||
@ -73,7 +73,7 @@ class Client:
|
||||
del base
|
||||
return []
|
||||
|
||||
def get_internal(self) -> InternalStatus: # pylint: disable=no-self-use
|
||||
def get_internal(self) -> InternalStatus:
|
||||
"""
|
||||
get internal service status
|
||||
|
||||
|
@ -85,7 +85,7 @@ class Package:
|
||||
Returns:
|
||||
List[str]: sum of dependencies per each package
|
||||
"""
|
||||
return sorted(set(sum([package.depends for package in self.packages.values()], start=[])))
|
||||
return sorted(set(sum((package.depends for package in self.packages.values()), start=[])))
|
||||
|
||||
@property
|
||||
def groups(self) -> List[str]:
|
||||
@ -95,7 +95,7 @@ class Package:
|
||||
Returns:
|
||||
List[str]: sum of groups per each package
|
||||
"""
|
||||
return sorted(set(sum([package.groups for package in self.packages.values()], start=[])))
|
||||
return sorted(set(sum((package.groups for package in self.packages.values()), start=[])))
|
||||
|
||||
@property
|
||||
def is_single_package(self) -> bool:
|
||||
@ -130,7 +130,7 @@ class Package:
|
||||
Returns:
|
||||
List[str]: sum of licenses per each package
|
||||
"""
|
||||
return sorted(set(sum([package.licenses for package in self.packages.values()], start=[])))
|
||||
return sorted(set(sum((package.licenses for package in self.packages.values()), start=[])))
|
||||
|
||||
@classmethod
|
||||
def from_archive(cls: Type[Package], path: Path, pacman: Pacman, remote: Optional[RemoteSource]) -> Package:
|
||||
|
Reference in New Issue
Block a user