Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddieAkeroyd committed Aug 28, 2024
1 parent d44d5ab commit 00ec0d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
6 changes: 2 additions & 4 deletions installation_and_upgrade/ibex_install_utils/install_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,7 @@ def run_vhd_post_install(self) -> None:
UpgradeInstrument.run_setup_log_rotation,
"setup log rotation",
),
"developer_update": (UpgradeInstrument.run_developer_update,
"install latest developer tools"),
"developer_update": (UpgradeInstrument.run_developer_update, "install latest developer tools"),
"create_vhds": (
UpgradeInstrument.run_vhd_creation,
"create a set of VHDS containing the latest IBEX release",
Expand All @@ -438,6 +437,5 @@ def run_vhd_post_install(self) -> None:
UpgradeInstrument.run_vhd_post_install,
"Run final task on system after VHD has been mounted locally",
),
"save_motor_params": (UpgradeInstrument.save_motor_params,
"Save motor parameters to csv file"),
"save_motor_params": (UpgradeInstrument.save_motor_params, "Save motor parameters to csv file"),
}
11 changes: 6 additions & 5 deletions installation_and_upgrade/ibex_install_utils/tasks/mysql_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ def truncate_database(self) -> None:
try:
mysql_bin_dir = self._get_mysql_dir()

sql_command = "truncate table msg_log.message;"\
"truncate table archive.sample;truncate table alarm.pv"
sql_command = (
"truncate table msg_log.message;"
"truncate table archive.sample;truncate table alarm.pv"
)

RunProcess(
MYSQL_FILES_DIR,
Expand Down Expand Up @@ -212,7 +214,7 @@ def temporarily_run_mysql(self, sql_password: str) -> None:
log_command_args=False, # To make sure password doesn't appear in jenkins log.
).run()

def _setup_database_users_and_tables(self, vhd_install:bool = True) -> None:
def _setup_database_users_and_tables(self, vhd_install: bool = True) -> None:
sql_password = self.prompt.prompt(
"Enter the MySQL root password:",
UserPrompt.ANY,
Expand Down Expand Up @@ -258,8 +260,7 @@ def _setup_mysql8_service(self) -> None:
# Wait for initialize since admin runner can't wait for completion.
# Maybe we can detect completion another way?
admin_commands.add_command(
mysqld, '--install MYSQL80 --datadir="{}"'.format(
os.path.join(MYSQL_FILES_DIR, "data"))
mysqld, '--install MYSQL80 --datadir="{}"'.format(os.path.join(MYSQL_FILES_DIR, "data"))
)

admin_commands.add_command("sc", "start MYSQL80", expected_return_val=None)
Expand Down

0 comments on commit 00ec0d6

Please sign in to comment.