mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Enable more typing
This commit is contained in:
parent
ce07d6ad31
commit
adfd12cfd0
@ -1,4 +1,4 @@
|
|||||||
# typed: false
|
# typed: true
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "keg_relocate"
|
require "keg_relocate"
|
||||||
@ -524,8 +524,8 @@ class Keg
|
|||||||
end
|
end
|
||||||
|
|
||||||
def delete_pyc_files!
|
def delete_pyc_files!
|
||||||
find { |pn| pn.delete if PYC_EXTENSIONS.include?(pn.extname) }
|
path.find { |pn| pn.delete if PYC_EXTENSIONS.include?(pn.extname) }
|
||||||
find { |pn| FileUtils.rm_rf pn if pn.basename.to_s == "__pycache__" }
|
path.find { |pn| FileUtils.rm_rf pn if pn.basename.to_s == "__pycache__" }
|
||||||
end
|
end
|
||||||
|
|
||||||
def binary_executable_or_library_files
|
def binary_executable_or_library_files
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# typed: false
|
# typed: true
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# Performs {Formula#mktemp}'s functionality, and tracks the results.
|
# Performs {Formula#mktemp}'s functionality, and tracks the results.
|
||||||
@ -70,7 +70,7 @@ class Mktemp
|
|||||||
begin
|
begin
|
||||||
chown(nil, group_id, @tmpdir)
|
chown(nil, group_id, @tmpdir)
|
||||||
rescue Errno::EPERM
|
rescue Errno::EPERM
|
||||||
opoo "Failed setting group \"#{Etc.getgrgid(group_id).name}\" on #{@tmpdir}"
|
opoo "Failed setting group \"#{T.must(Etc.getgrgid(group_id)).name}\" on #{@tmpdir}"
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# typed: false
|
# typed: true
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# A formula option.
|
# A formula option.
|
||||||
|
8
Library/Homebrew/options.rbi
Normal file
8
Library/Homebrew/options.rbi
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# typed: strict
|
||||||
|
|
||||||
|
class Options
|
||||||
|
# This is a workaround to enable `alias to_ary to_a`
|
||||||
|
# @see https://github.com/sorbet/sorbet/issues/2378#issuecomment-569474238
|
||||||
|
sig { returns(T::Array[Option]) }
|
||||||
|
def to_a; end
|
||||||
|
end
|
@ -1,4 +1,4 @@
|
|||||||
# typed: false
|
# typed: true
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# {Pathname} extension for dealing with ELF files.
|
# {Pathname} extension for dealing with ELF files.
|
||||||
|
5
Library/Homebrew/os/linux/elf.rbi
Normal file
5
Library/Homebrew/os/linux/elf.rbi
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# typed: strict
|
||||||
|
|
||||||
|
module ELFShim
|
||||||
|
requires_ancestor { Pathname }
|
||||||
|
end
|
@ -1,4 +1,4 @@
|
|||||||
# typed: false
|
# typed: true
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "macho"
|
require "macho"
|
||||||
|
5
Library/Homebrew/os/mac/mach.rbi
Normal file
5
Library/Homebrew/os/mac/mach.rbi
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# typed: strict
|
||||||
|
|
||||||
|
module MachOShim
|
||||||
|
include Kernel
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user