Skip to content

Commit

Permalink
Merge pull request #5661 from rhinstaller/dependabot/pip/dockerfile/p…
Browse files Browse the repository at this point in the history
…ylint-and-astroid-282ccd21c5

infra: bump the pylint-and-astroid group across 1 directory with 2 updates
  • Loading branch information
jkonecny12 committed Jun 10, 2024
2 parents 1cdc7d7 + 6a12d15 commit a0fc6da
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
14 changes: 10 additions & 4 deletions anaconda.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ def exitHandler(rebootData):
from pyanaconda.core.process_watchers import WatchProcesses
WatchProcesses.unwatch_all_processes()

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

# pylint: disable=possibly-used-before-assignment
# pylint: disable=used-before-assignment
if "nokill" in kernel_arguments:
util.vtActivate(1)
Expand All @@ -54,13 +56,14 @@ def exitHandler(rebootData):
uninhibit_screensaver()

# Unsetup the payload, which most usefully unmounts live images
# pylint: disable=possibly-used-before-assignment
if anaconda.payload:
anaconda.payload.unsetup()

# Collect all optical media.
from pyanaconda.modules.common.constants.objects import DEVICE_TREE
from pyanaconda.modules.common.structures.storage import DeviceData
device_tree = STORAGE.get_proxy(DEVICE_TREE)
device_tree = STORAGE.get_proxy(DEVICE_TREE) # pylint: disable=possibly-used-before-assignment
optical_media = []

for device_name in device_tree.FindOpticalMedia():
Expand All @@ -81,15 +84,16 @@ def exitHandler(rebootData):
anaconda.dbus_launcher.stop()

# Clean up the PID file
if pidfile:
if pidfile: # pylint: disable=possibly-used-before-assignment
pidfile.close()

# Reboot the system.
if conf.system.can_reboot:
if conf.system.can_reboot: # pylint: disable=possibly-used-before-assignment
from pykickstart.constants import KS_SHUTDOWN, KS_WAIT

if flags.eject or rebootData.eject:
for device_path in optical_media:
# pylint: disable=possibly-used-before-assignment
if path.get_mount_paths(device_path):
util.dracut_eject(device_path)

Expand Down Expand Up @@ -152,7 +156,9 @@ def setup_environment():
if "DISPLAY" in os.environ:
flags.preexisting_x11 = True
else:
os.environ["DISPLAY"] = ":%s" % constants.X_DISPLAY_NUMBER # pylint: disable=used-before-assignment
# This line is too long, unfortunately this disable won't work when used on above line
# pylint: disable=used-before-assignment
os.environ["DISPLAY"] = ":%s" % constants.X_DISPLAY_NUMBER # pylint: disable=possibly-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
Expand Down
4 changes: 2 additions & 2 deletions dockerfile/anaconda-ci/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ pyyaml
jinja2

# pylint and its supporting libs
pylint == 3.1.0
astroid == 3.1.0
pylint == 3.2.2
astroid == 3.2.2

# ruff for fast linting
ruff == 0.4.7
Expand Down
2 changes: 2 additions & 0 deletions pyanaconda/modules/storage/bootloader/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,8 @@ def _set_storage_boot_args(self, storage):
if device != dep and not device.depends_on(dep):
continue

setup_args = None

if isinstance(dep, blivet.devices.FcoeDiskDevice):
log.debug("Getting dracut arguments for FCoE device %s", dep)
setup_args = fcoe_proxy.GetDracutArguments(dep.nic)
Expand Down
3 changes: 2 additions & 1 deletion pyanaconda/ui/gui/spokes/lib/accordion.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ def process_event(self, selector, event, cb):
gi.require_version("Gdk", "3.0")
from gi.repository import Gdk

old_selector = self.current_selector

if event:
if event.type not in [Gdk.EventType.BUTTON_PRESS, Gdk.EventType.KEY_RELEASE,
Gdk.EventType.FOCUS_CHANGE]:
Expand All @@ -325,7 +327,6 @@ def process_event(self, selector, event, cb):
event.keyval not in [Gdk.KEY_space, Gdk.KEY_Return, Gdk.KEY_ISO_Enter, Gdk.KEY_KP_Enter, Gdk.KEY_KP_Space]:
return

old_selector = self.current_selector
# deal with multiselection
state = event.get_state()
if state & Gdk.ModifierType.CONTROL_MASK: # holding CTRL
Expand Down
3 changes: 3 additions & 0 deletions pyanaconda/ui/gui/spokes/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def refresh(self):
homedir = self.user.homedir
elif self.user.name:
homedir = "/home/" + self.user.name
else:
# this state shouldn't happen
raise ValueError("Can't resolve home directory")

self._tHome.set_text(homedir)
self._origHome = homedir
Expand Down

0 comments on commit a0fc6da

Please sign in to comment.