Skip to content

Commit

Permalink
lint a random file (#4002)
Browse files Browse the repository at this point in the history
  • Loading branch information
osc-bot authored Dec 10, 2024
1 parent 26e3f7e commit 641a738
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/dashboard/app/models/concerns/user_setting_store.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module UserSettingStore
# frozen_string_literal: true

module UserSettingStore
BC_TEMPLATES = :batch_connect_templates

def user_settings
Expand All @@ -23,7 +24,7 @@ def read_user_settings
begin
yml = YAML.safe_load(user_settings_path.read) || {}
user_settings = yml.deep_symbolize_keys
rescue => e
rescue StandardError => e
Rails.logger.error("Can't read or parse settings file: #{user_settings_path} because of error #{e}")
end

Expand All @@ -33,7 +34,7 @@ def read_user_settings
def save_user_settings
# Ensure there is a directory to write the user settings file
user_settings_path.dirname.tap { |p| p.mkpath unless p.exist? }
File.open(user_settings_path.to_s, "w") { |file| file.write(@user_settings.deep_stringify_keys.to_yaml) }
File.open(user_settings_path.to_s, 'w') { |file| file.write(@user_settings.deep_stringify_keys.to_yaml) }
end

def user_settings_path
Expand Down

0 comments on commit 641a738

Please sign in to comment.