Commit c7c2b9ec authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch 'kassio/fix-import-export-karg-warnings' into 'master'

Fix lib/gitlab/import_export/* kwargs warnings

See merge request gitlab-org/gitlab!44772
parents c3ac137b c5e4ed33
...@@ -20,8 +20,8 @@ module Gitlab ...@@ -20,8 +20,8 @@ module Gitlab
/\Aremote_\w+_(url|urls|request_header)\Z/ # carrierwave automatically creates these attribute methods for uploads /\Aremote_\w+_(url|urls|request_header)\Z/ # carrierwave automatically creates these attribute methods for uploads
).freeze ).freeze
def self.clean(*args) def self.clean(*args, **kwargs)
new(*args).clean new(*args, **kwargs).clean
end end
def initialize(relation_hash:, relation_class:, excluded_keys: []) def initialize(relation_hash:, relation_class:, excluded_keys: [])
......
...@@ -31,8 +31,8 @@ module Gitlab ...@@ -31,8 +31,8 @@ module Gitlab
TOKEN_RESET_MODELS = %i[Project Namespace Group Ci::Trigger Ci::Build Ci::Runner ProjectHook].freeze TOKEN_RESET_MODELS = %i[Project Namespace Group Ci::Trigger Ci::Build Ci::Runner ProjectHook].freeze
def self.create(*args) def self.create(*args, **kwargs)
new(*args).create new(*args, **kwargs).create
end end
def self.relation_class(relation_name) def self.relation_class(relation_name)
......
...@@ -10,8 +10,8 @@ module Gitlab ...@@ -10,8 +10,8 @@ module Gitlab
MAX_RETRIES = 8 MAX_RETRIES = 8
IGNORED_FILENAMES = %w(. ..).freeze IGNORED_FILENAMES = %w(. ..).freeze
def self.import(*args) def self.import(*args, **kwargs)
new(*args).import new(*args, **kwargs).import
end end
def initialize(importable:, archive_file:, shared:) def initialize(importable:, archive_file:, shared:)
......
...@@ -36,7 +36,7 @@ module Gitlab ...@@ -36,7 +36,7 @@ module Gitlab
end end
def exportable def exportable
@project.present(exportable_params) @project.present(**exportable_params)
end end
def exportable_params def exportable_params
......
...@@ -5,8 +5,8 @@ module Gitlab ...@@ -5,8 +5,8 @@ module Gitlab
class Saver class Saver
include Gitlab::ImportExport::CommandLineUtil include Gitlab::ImportExport::CommandLineUtil
def self.save(*args) def self.save(*args, **kwargs)
new(*args).save new(*args, **kwargs).save
end end
def initialize(exportable:, shared:) def initialize(exportable:, shared:)
......
...@@ -40,7 +40,7 @@ module Gitlab ...@@ -40,7 +40,7 @@ module Gitlab
def add_upload(upload) def add_upload(upload)
uploader_context = FileUploader.extract_dynamic_path(upload).named_captures.symbolize_keys uploader_context = FileUploader.extract_dynamic_path(upload).named_captures.symbolize_keys
UploadService.new(@project, File.open(upload, 'r'), FileUploader, uploader_context).execute.to_h UploadService.new(@project, File.open(upload, 'r'), FileUploader, **uploader_context).execute.to_h
end end
def copy_project_uploads def copy_project_uploads
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
module Gitlab module Gitlab
module ImportExport module ImportExport
class VersionChecker class VersionChecker
def self.check!(*args) def self.check!(*args, **kwargs)
new(*args).check! new(*args, **kwargs).check!
end end
def initialize(shared:) def initialize(shared:)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment