Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make pylint work again #5269

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -473,7 +473,11 @@ tests-pylint:
# For a weird reason when pylint is not in TESTS included for automake (during configure)
# it won't allow us to use makefile check to start the tests.
# Unfortunately, we removed pylint from the TESTS because we don't want it to run as default
$(srcdir)/tests/pylint/runpylint | tee $(srcdir)/tests/pylint/runpylint.log
set -o pipefail ; \
$(srcdir)/tests/pylint/runpylint | tee $(srcdir)/tests/pylint/runpylint.log ; \
rc=$$? ; \
$(MAKE) grab-logs ; \
exit $$rc

tests-unit-only:
@mkdir -p $(USER_SITE_PACKAGES)
6 changes: 4 additions & 2 deletions anaconda.py
Original file line number Diff line number Diff line change
@@ -36,9 +36,11 @@ def exitHandler(rebootData):
from pyanaconda.core.process_watchers import WatchProcesses
WatchProcesses.unwatch_all_processes()

# pylint: disable=used-before-assignment
if flags.usevnc:
vnc.shutdownServer()

# pylint: disable=used-before-assignment
if "nokill" in kernel_arguments:
util.vtActivate(1)
print("anaconda halting due to nokill flag.")
@@ -67,7 +69,7 @@ def exitHandler(rebootData):

# Tear down the storage module.
storage_proxy = STORAGE.get_proxy()
from pyanaconda.modules.common.task import sync_run_task
from pyanaconda.modules.common.task import sync_run_task # pylint: disable=redefined-outer-name

for task_path in storage_proxy.TeardownWithTasks():
task_proxy = STORAGE.get_proxy(task_path)
@@ -148,7 +150,7 @@ def setup_environment():
if "DISPLAY" in os.environ:
flags.preexisting_x11 = True
else:
os.environ["DISPLAY"] = ":%s" % constants.X_DISPLAY_NUMBER
os.environ["DISPLAY"] = ":%s" % constants.X_DISPLAY_NUMBER # pylint: disable=used-before-assignment

# We mostly don't run from bash, so it won't load the file for us, and libreport will then
# show vi instead of nano. Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1889674
2 changes: 1 addition & 1 deletion dockerfile/anaconda-ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ jinja2

# pylint and its supporting libs
pylint == 3.0.3
astroid == 3.0.2
astroid == 3.0.3

# ruff for fast linting
ruff == 0.1.14
1 change: 1 addition & 0 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ TESTS = \
glade_tests/glade_tests.sh \
shellcheck/run_shellcheck.sh \
ruff/run_ruff.sh \
pylint/runpylint \
unit_tests/unit_tests.sh

clean-local: