Skip to content

Commit e14e101

Browse files
aloysbailletclaude
andcommitted
Fix SonarCloud/pylint warnings: unused imports, variables, and deprecated config
Remove unused imports (os in utils.py, tempfile/os in test_utils.py), unused variable assignment in builder.py, unused arguments in deprecated CLI stubs, and deprecated ignore-mixin-members pylintrc option. Closes #377 Signed-off-by: Aloys Baillet <aloys.baillet+github@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d95cc87 commit e14e101

5 files changed

Lines changed: 3 additions & 10 deletions

File tree

pylintrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,6 @@ contextmanager-decorators=contextlib.contextmanager
380380
# expressions are accepted.
381381
generated-members=
382382

383-
# Tells whether missing members accessed in mixin class should be ignored. A
384-
# mixin class is detected if its name ends with "mixin" (case insensitive).
385-
ignore-mixin-members=yes
386-
387383
# Tells whether to warn about missing members when the owner of the attribute
388384
# is inferred to be None.
389385
ignore-none=yes

python/aswfdocker/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def make_bake_dict(
4343
version_info = self.index.version_info(major_version)
4444
if self.group_info.type == constants.ImageType.PACKAGE:
4545
image_base = image.replace("ci-package-", "")
46-
group = self.index.get_group_from_image(
46+
self.index.get_group_from_image(
4747
self.group_info.type, image_base
4848
)
4949
if version in versions_to_bake:

python/aswfdocker/cli/aswfdocker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def build(
244244
help="Version of the package to migrate (all versions are migrated by default)",
245245
)
246246
@click.option("--dry-run", "-d", is_flag=True)
247-
def migrate(from_org, to_org, package, version, dry_run):
247+
def migrate(**kwargs):
248248
pass
249249

250250

@@ -289,7 +289,7 @@ def getdockerpush(build_info):
289289
help="Package version to download",
290290
)
291291
@pass_build_info
292-
def download(build_info, docker_org, package, version):
292+
def download(**kwargs):
293293
pass
294294

295295

python/aswfdocker/tests/test_utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
import unittest
88
import logging
9-
import tempfile
10-
import os
119

1210
from click.testing import CliRunner
1311

python/aswfdocker/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""
44
Utility functions
55
"""
6-
import os
76
import re
87
import subprocess
98
import datetime

0 commit comments

Comments
 (0)