Fix type errors

This commit is contained in:
Douglas Eichelberger 2025-09-08 09:10:13 -07:00
parent 18235d305d
commit 61e08e4b41
No known key found for this signature in database
GPG Key ID: F90193CBD547EB81
3 changed files with 6 additions and 5 deletions

View File

@ -11,7 +11,7 @@ module Cask
sig { returns(T.nilable(T::Array[T.untyped])) }
attr_accessor :uninstall_artifacts
sig { params(attributes: T::Hash[T.any(String, Symbol), T.untyped]).void }
sig { params(attributes: T.any(T::Hash[String, T.untyped], T::Hash[Symbol, T.untyped])).void }
def initialize(attributes = {})
@uninstall_flight_blocks = T.let(nil, T.nilable(T::Boolean))
@uninstall_artifacts = T.let(nil, T.nilable(T::Array[T.untyped]))

View File

@ -27,7 +27,7 @@ class SystemCommand
args: T::Array[T.any(String, Integer, Float, Pathname, URI::Generic)],
sudo: T::Boolean,
sudo_as_root: T::Boolean,
env: T::Hash[String, String],
env: T::Hash[String, T.any(NilClass, String, T::Boolean)],
input: T.any(String, T::Array[String]),
must_succeed: T::Boolean,
print_stdout: T.any(T::Boolean, Symbol),
@ -56,7 +56,7 @@ class SystemCommand
args: T::Array[T.any(String, Integer, Float, Pathname, URI::Generic)],
sudo: T::Boolean,
sudo_as_root: T::Boolean,
env: T::Hash[String, String],
env: T::Hash[String, T.any(NilClass, String, T::Boolean)],
input: T.any(String, T::Array[String]),
print_stdout: T.any(T::Boolean, Symbol),
print_stderr: T.any(T::Boolean, Symbol),
@ -84,7 +84,7 @@ class SystemCommand
args: T::Array[T.any(String, Integer, Float, Pathname, URI::Generic)],
sudo: T::Boolean,
sudo_as_root: T::Boolean,
env: T::Hash[String, String],
env: T::Hash[String, T.any(NilClass, String, T::Boolean)],
input: T.any(String, T::Array[String]),
must_succeed: T::Boolean,
print_stdout: T.any(T::Boolean, Symbol),
@ -110,7 +110,7 @@ class SystemCommand
args: T::Array[T.any(String, Integer, Float, Pathname, URI::Generic)],
sudo: T::Boolean,
sudo_as_root: T::Boolean,
env: T::Hash[String, String],
env: T::Hash[String, T.any(NilClass, String, T::Boolean)],
input: T.any(String, T::Array[String]),
must_succeed: T::Boolean,
print_stdout: T.any(T::Boolean, Symbol),

View File

@ -38,6 +38,7 @@ class AbstractTab
# @api internal
attr_accessor :runtime_dependencies
# TODO: Update attributes to only accept symbol keys (kwargs style).
sig { params(attributes: T.any(T::Hash[String, T.untyped], T::Hash[Symbol, T.untyped])).void }
def initialize(attributes = {})
@installed_as_dependency = T.let(nil, T.nilable(T::Boolean))