Skip to content

Commit 442bd81

Browse files
committed
brew style --fix --todo
1 parent e023317 commit 442bd81

37 files changed

Lines changed: 96 additions & 83 deletions

Library/Homebrew/brew_irb_helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def c(config: nil)
2121
end
2222
end
2323

24-
class Symbol
24+
class Symbol # rubocop:todo Style/OneClassPerFile
2525
# @!visibility private
2626
sig { params(args: Integer).returns(Formula) }
2727
def f(*args)

Library/Homebrew/cache_store.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def dirty?
189189
# {CacheStore} provides methods to mutate and fetch data from a persistent
190190
# storage mechanism.
191191
#
192-
class CacheStore
192+
class CacheStore # rubocop:todo Style/OneClassPerFile
193193
extend T::Helpers
194194

195195
abstract!

Library/Homebrew/cmd/update-report.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def install_from_api_message
370370

371371
require "extend/os/cmd/update-report"
372372

373-
class Reporter
373+
class Reporter # rubocop:todo Style/OneClassPerFile
374374
include Utils::Output::Mixin
375375

376376
Report = T.type_alias do
@@ -774,7 +774,7 @@ def diff
774774
end
775775
end
776776

777-
class ReporterHub
777+
class ReporterHub # rubocop:todo Style/OneClassPerFile
778778
include Utils::Output::Mixin
779779

780780
sig { returns(T::Array[Reporter]) }

Library/Homebrew/compilers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module CompilerConstants
1717
end
1818

1919
# Class for checking compiler compatibility for a formula.
20-
class CompilerFailure
20+
class CompilerFailure # rubocop:todo Style/OneClassPerFile
2121
sig { returns(Symbol) }
2222
attr_reader :type
2323

@@ -97,7 +97,7 @@ def gcc_major(version)
9797
end
9898

9999
# Class for selecting a compiler for a formula.
100-
class CompilerSelector
100+
class CompilerSelector # rubocop:todo Style/OneClassPerFile
101101
include CompilerConstants
102102

103103
class Compiler < T::Struct

Library/Homebrew/dependencies.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def inspect
4242
end
4343

4444
# A collection of requirements.
45-
class Requirements < SimpleDelegator
45+
class Requirements < SimpleDelegator # rubocop:todo Style/OneClassPerFile
4646
def initialize(*args)
4747
super(Set.new(args))
4848
end

Library/Homebrew/dependencies.rbi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Dependencies < SimpleDelegator
1818
def select(&blk); end
1919
end
2020

21-
class Requirements < SimpleDelegator
21+
class Requirements < SimpleDelegator # rubocop:todo Style/OneClassPerFile
2222
include Enumerable
2323
include Kernel
2424

Library/Homebrew/dependency.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def merge_temporality(deps)
297297
end
298298

299299
# A dependency that's marked as "installed" on macOS
300-
class UsesFromMacOSDependency < Dependency
300+
class UsesFromMacOSDependency < Dependency # rubocop:todo Style/OneClassPerFile
301301
attr_reader :bounds
302302

303303
sig { params(name: String, tags: T::Array[Symbol], bounds: T::Hash[Symbol, Symbol]).void }

Library/Homebrew/description_cache_store.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def select(&block)
9797
# {CaskDescriptionCacheStore} provides methods to fetch and mutate cask descriptions used
9898
# by the `brew desc` and `brew search` commands.
9999
#
100-
class CaskDescriptionCacheStore < DescriptionCacheStore
100+
class CaskDescriptionCacheStore < DescriptionCacheStore # rubocop:todo Style/OneClassPerFile
101101
# If the database is empty `update!` it with all known casks.
102102
#
103103
# @return [nil]

Library/Homebrew/download_strategy.rb

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Mechanize; end
2323
require "github_packages"
2424

2525
# @abstract Abstract superclass for all download strategies.
26-
class AbstractDownloadStrategy
26+
class AbstractDownloadStrategy # rubocop:todo Style/OneClassPerFile
2727
extend T::Helpers
2828
include FileUtils
2929
include Context
@@ -203,7 +203,7 @@ def env
203203
end
204204

205205
# @abstract Abstract superclass for all download strategies downloading from a version control system.
206-
class VCSDownloadStrategy < AbstractDownloadStrategy
206+
class VCSDownloadStrategy < AbstractDownloadStrategy # rubocop:todo Style/OneClassPerFile
207207
abstract!
208208

209209
sig { override.returns(Pathname) }
@@ -303,7 +303,7 @@ def extract_ref(specs)
303303
end
304304

305305
# @abstract Abstract superclass for all download strategies downloading a single file.
306-
class AbstractFileDownloadStrategy < AbstractDownloadStrategy
306+
class AbstractFileDownloadStrategy < AbstractDownloadStrategy # rubocop:todo Style/OneClassPerFile
307307
abstract!
308308

309309
# Path for storing an incomplete download while the download is still in progress.
@@ -431,7 +431,7 @@ def parse_basename(url, search_query: true)
431431
# Strategy for downloading files using `curl`.
432432
#
433433
# @api public
434-
class CurlDownloadStrategy < AbstractFileDownloadStrategy
434+
class CurlDownloadStrategy < AbstractFileDownloadStrategy # rubocop:todo Style/OneClassPerFile
435435
include Utils::Curl
436436

437437
# url, basename, time, file_size, content_type, is_redirection
@@ -701,7 +701,7 @@ def curl(*args, print_stdout: true, **options)
701701
# Strategy for downloading a file using Homebrew's `curl`.
702702
#
703703
# @api public
704-
class HomebrewCurlDownloadStrategy < CurlDownloadStrategy
704+
class HomebrewCurlDownloadStrategy < CurlDownloadStrategy # rubocop:todo Style/OneClassPerFile
705705
private
706706

707707
sig {
@@ -726,7 +726,7 @@ def curl_output(*args, **options)
726726
# Strategy for downloading a file from an GitHub Packages URL.
727727
#
728728
# @api public
729-
class CurlGitHubPackagesDownloadStrategy < CurlDownloadStrategy
729+
class CurlGitHubPackagesDownloadStrategy < CurlDownloadStrategy # rubocop:todo Style/OneClassPerFile
730730
sig { params(resolved_basename: String).returns(T.nilable(String)) }
731731
attr_writer :resolved_basename
732732

@@ -760,7 +760,7 @@ def resolve_url_basename_time_file_size(url, timeout: nil)
760760
# Strategy for downloading a file from an Apache Mirror URL.
761761
#
762762
# @api public
763-
class CurlApacheMirrorDownloadStrategy < CurlDownloadStrategy
763+
class CurlApacheMirrorDownloadStrategy < CurlDownloadStrategy # rubocop:todo Style/OneClassPerFile
764764
sig { returns(T::Array[String]) }
765765
def mirrors
766766
combined_mirrors
@@ -809,7 +809,7 @@ def apache_mirrors
809809
# Query parameters on the URL are converted into POST parameters.
810810
#
811811
# @api public
812-
class CurlPostDownloadStrategy < CurlDownloadStrategy
812+
class CurlPostDownloadStrategy < CurlDownloadStrategy # rubocop:todo Style/OneClassPerFile
813813
private
814814

815815
sig {
@@ -833,7 +833,7 @@ def _fetch(url:, resolved_url:, timeout:)
833833
# (Useful for downloading `.jar` files.)
834834
#
835835
# @api public
836-
class NoUnzipCurlDownloadStrategy < CurlDownloadStrategy
836+
class NoUnzipCurlDownloadStrategy < CurlDownloadStrategy # rubocop:todo Style/OneClassPerFile
837837
sig { override.params(_block: T.nilable(T.proc.void)).void }
838838
def stage(&_block)
839839
UnpackStrategy::Uncompressed.new(cached_location)
@@ -844,7 +844,7 @@ def stage(&_block)
844844
end
845845

846846
# Strategy for extracting local binary packages.
847-
class LocalBottleDownloadStrategy < AbstractFileDownloadStrategy
847+
class LocalBottleDownloadStrategy < AbstractFileDownloadStrategy # rubocop:todo Style/OneClassPerFile
848848
# TODO: Call `super` here
849849
# rubocop:disable Lint/MissingSuper
850850
sig { params(path: Pathname).void }
@@ -862,7 +862,7 @@ def clear_cache
862862
# Strategy for downloading a Subversion repository.
863863
#
864864
# @api public
865-
class SubversionDownloadStrategy < VCSDownloadStrategy
865+
class SubversionDownloadStrategy < VCSDownloadStrategy # rubocop:todo Style/OneClassPerFile
866866
sig { params(url: String, name: String, version: T.nilable(T.any(String, Version)), meta: T.untyped).void }
867867
def initialize(url, name, version, **meta)
868868
super
@@ -981,7 +981,7 @@ def clone_repo(timeout: nil)
981981
# Strategy for downloading a Git repository.
982982
#
983983
# @api public
984-
class GitDownloadStrategy < VCSDownloadStrategy
984+
class GitDownloadStrategy < VCSDownloadStrategy # rubocop:todo Style/OneClassPerFile
985985
MINIMUM_COMMIT_HASH_LENGTH = 7
986986

987987
sig { params(url: String, name: String, version: T.nilable(T.any(String, Version)), meta: T.untyped).void }
@@ -1268,7 +1268,7 @@ def configure_sparse_checkout
12681268
# Strategy for downloading a Git repository from GitHub.
12691269
#
12701270
# @api public
1271-
class GitHubGitDownloadStrategy < GitDownloadStrategy
1271+
class GitHubGitDownloadStrategy < GitDownloadStrategy # rubocop:todo Style/OneClassPerFile
12721272
sig { params(url: String, name: String, version: T.nilable(Version), meta: T.untyped).void }
12731273
def initialize(url, name, version, **meta)
12741274
super
@@ -1329,7 +1329,7 @@ def default_branch
13291329
# Strategy for downloading a CVS repository.
13301330
#
13311331
# @api public
1332-
class CVSDownloadStrategy < VCSDownloadStrategy
1332+
class CVSDownloadStrategy < VCSDownloadStrategy # rubocop:todo Style/OneClassPerFile
13331333
sig { params(url: String, name: String, version: T.nilable(T.any(String, Version)), meta: T.untyped).void }
13341334
def initialize(url, name, version, **meta)
13351335
super
@@ -1422,7 +1422,7 @@ def split_url(in_url)
14221422
# Strategy for downloading a Mercurial repository.
14231423
#
14241424
# @api public
1425-
class MercurialDownloadStrategy < VCSDownloadStrategy
1425+
class MercurialDownloadStrategy < VCSDownloadStrategy # rubocop:todo Style/OneClassPerFile
14261426
sig { params(url: String, name: String, version: T.nilable(T.any(String, Version)), meta: T.untyped).void }
14271427
def initialize(url, name, version, **meta)
14281428
super
@@ -1510,7 +1510,7 @@ def current_revision
15101510
# Strategy for downloading a Bazaar repository.
15111511
#
15121512
# @api public
1513-
class BazaarDownloadStrategy < VCSDownloadStrategy
1513+
class BazaarDownloadStrategy < VCSDownloadStrategy # rubocop:todo Style/OneClassPerFile
15141514
sig { params(url: String, name: String, version: T.nilable(T.any(String, Version)), meta: T.untyped).void }
15151515
def initialize(url, name, version, **meta)
15161516
super
@@ -1576,7 +1576,7 @@ def update(timeout: nil)
15761576
# Strategy for downloading a Fossil repository.
15771577
#
15781578
# @api public
1579-
class FossilDownloadStrategy < VCSDownloadStrategy
1579+
class FossilDownloadStrategy < VCSDownloadStrategy # rubocop:todo Style/OneClassPerFile
15801580
sig { params(url: String, name: String, version: T.nilable(T.any(String, Version)), meta: T.untyped).void }
15811581
def initialize(url, name, version, **meta)
15821582
super
@@ -1630,7 +1630,7 @@ def update(timeout: nil)
16301630
end
16311631

16321632
# Helper class for detecting a download strategy from a URL.
1633-
class DownloadStrategyDetector
1633+
class DownloadStrategyDetector # rubocop:todo Style/OneClassPerFile
16341634
sig {
16351635
params(url: String, using: T.nilable(T.any(Symbol, T::Class[AbstractDownloadStrategy])))
16361636
.returns(T::Class[AbstractDownloadStrategy])

Library/Homebrew/download_strategy.rbi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ end
1010

1111
# This is a third-party implementation.
1212
# rubocop:disable Style/OptionalBooleanParameter
13-
class Mechanize::HTTP::ContentDispositionParser
13+
class Mechanize::HTTP::ContentDispositionParser # rubocop:todo Style/OneClassPerFile
1414
sig {
1515
params(content_disposition: String, header: T::Boolean)
1616
.returns(T.nilable(Mechanize::HTTP::ContentDisposition))

0 commit comments

Comments
 (0)