Skip to content

Commit

Permalink
ci: pylint too-many-positional-arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jdobes committed Oct 16, 2024
1 parent 6078988 commit fa02137
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vmaas/reposcan/database/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _set_current_db_version(version, conn):
conn.commit()

@staticmethod
def _insert_log_entry(version, status, script, conn, returncode=None, stdout=None, stderr=None):
def _insert_log_entry(version, status, script, conn, *, returncode=None, stdout=None, stderr=None):
with conn.cursor() as cur:
cur.execute("""insert into db_upgrade_log
(version, status, script, returncode, stdout, stderr)
Expand Down
2 changes: 1 addition & 1 deletion vmaas/reposcan/download/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DownloadItem:
and result HTTP status code of the download operation.
"""

def __init__(self, source_url: str | None = None, target_path: Path | None = None,
def __init__(self, *, source_url: str | None = None, target_path: Path | None = None,
ca_cert: str | None = None, cert: str | None = None, key: str | None = None) -> None:
self.source_url = source_url
self.target_path = target_path
Expand Down
1 change: 1 addition & 0 deletions vmaas/reposcan/redhatcsaf/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class CsafProducts:
def to_tuples(
self,
attributes: tuple[str, ...],
*,
missing_only: bool = False,
with_id: bool = False,
with_cpe_id: bool = False,
Expand Down
2 changes: 1 addition & 1 deletion vmaas/reposcan/repodata/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Repository:
"""
# pylint: disable=too-many-instance-attributes

def __init__(self, repo_url, content_set, basearch, releasever, cert_name=None, ca_cert=None, cert=None, key=None):
def __init__(self, repo_url, content_set, basearch, releasever, *, cert_name=None, ca_cert=None, cert=None, key=None):
self.repo_url = repo_url
self.repomd = None
self.primary = None
Expand Down
2 changes: 1 addition & 1 deletion vmaas/reposcan/repodata/repository_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def add_db_repositories(self):
cert_name=repo_dict["cert_name"], ca_cert=repo_dict["ca_cert"],
cert=repo_dict["cert"], key=repo_dict["key"]))

def add_repository(self, repo_url, content_set, basearch, releasever,
def add_repository(self, repo_url, content_set, basearch, releasever, *,
cert_name=None, ca_cert=None, cert=None, key=None):
"""Queue repository to import/check updates."""
repo_url = repo_url.strip()
Expand Down
3 changes: 3 additions & 0 deletions vmaas/webapp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
from vmaas.common.middlewares import ErrorHandlerMiddleware, TimingLoggingMiddleware
from vmaas.common.strtobool import strtobool

# NOTE: this module is going to be removed soon
# pylint: disable=too-many-positional-arguments

# pylint: disable=too-many-lines
CFG = Config()

Expand Down
3 changes: 3 additions & 0 deletions vmaas/webapp/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

SECURITY_ERRATA_TYPE = 'security'

# NOTE: this module is going to be removed soon
# pylint: disable=too-many-positional-arguments


def filter_non_security(errata_detail: dict, security_only: bool) -> bool:
"""Decide whether the errata should be filtered base on 'securiyt only' rule."""
Expand Down

0 comments on commit fa02137

Please sign in to comment.