Commit 7d2adccf authored by Jakub Ružička's avatar Jakub Ružička
Browse files

pylint: make pylint pass on new packages

Correctly marking apkg sub-packages with __init__.py revealed tons of
new and mostly irrelevant pylint warnings.

Silence pylint cries.
parent f2ad22d4
......@@ -28,8 +28,9 @@ from apkg.lib import build
def run_command(cargs):
args = docopt(__doc__, argv=cargs)
# XXX: this will be refactored in following patch
# disabling for now
# XXX: this will be refactored in following patch, disabling for now
# https://gitlab.nic.cz/packaging/apkg/-/issues/34
# pylint: disable=unreachable
raise NotImplementedError
return build.install_build_deps(
srcpkg=args['--srcpkg'],
......
......@@ -60,6 +60,8 @@ def print_status():
msg = "current distro: {t.cyan}{id}{t.normal} / {t.cyan}{full}{t.normal}"
print(msg.format(full=adistro.fullname(), id=adistro.idver(), t=T))
# we know what we're doing here
# pylint: disable=protected-access
template = proj._get_template_for_distro(adistro.idver())
msg = " package style: "
if template:
......
......@@ -68,7 +68,7 @@ def build_packages(
build_path,
out_path,
srcpkg_paths,
**kwargs):
**_):
srcpkg_path = srcpkg_paths[0]
if srcpkg_path.name != 'PKGBUILD':
raise ex.InvalidSourcePackageFormat(
......
......@@ -36,6 +36,8 @@ def walk(top, **kwargs):
return os.walk(str(top), **kwargs)
# pylint: disable=redefined-builtin
# this function copies upstream arg names 1:1
def unpack_archive(filename, extract_dir=None, format=None):
# shutil supports pathlib starting with python 3.7
if extract_dir:
......
"""
shared apkg testing functions
"""
# pylint: disable=dangerous-default-value
from pathlib import Path
import apkg.util.shutil35 as shutil
......
[MESSAGES CONTROL]
disable=
broad-except,
duplicate-code, # unevitable with pkgstyle plugin arch
fixme,
global-statement,
invalid-name,
......@@ -10,6 +11,11 @@ disable=
no-self-use,
raise-missing-from,
too-few-public-methods,
too-many-arguments,
too-many-branches,
too-many-locals,
too-many-public-methods,
too-many-statements,
unused-import, # checked by flake8
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment