Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ target :lib do
signature "stdlib/rdoc/0/"
signature "stdlib/ripper/0"
signature "stdlib/pp/0"
signature "steep/patch.rbs"

# configure_code_diagnostics do |config|
# config[D::Ruby::MethodDefinitionMissing] = :hint
Expand Down
6 changes: 3 additions & 3 deletions lib/rbs/method_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ def has_classish_type?
end

def with_nonreturn_void?
if type.with_nonreturn_void? # steep:ignore DeprecatedReference
if type.with_nonreturn_void?
true
else
if block = block()
block.type.with_nonreturn_void? || # steep:ignore DeprecatedReference
block.self_type&.with_nonreturn_void? || # steep:ignore DeprecatedReference
block.type.with_nonreturn_void? ||
block.self_type&.with_nonreturn_void? ||
false
else
false
Expand Down
2 changes: 1 addition & 1 deletion lib/rbs/prototype/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Helpers
private

def parse_comments(string, include_trailing:)
Prism.parse_comments(string, version: "current").yield_self do |prism_comments| # steep:ignore UnexpectedKeywordArgument
Prism.parse_comments(string, version: "current").yield_self do |prism_comments|
prism_comments.each_with_object({}) do |comment, hash| #$ Hash[Integer, AST::Comment]
# Skip EmbDoc comments
next unless comment.is_a?(Prism::InlineComment)
Expand Down
20 changes: 10 additions & 10 deletions lib/rbs/types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def with_nonreturn_void?
# `void` in immediate generics parameter is allowed
false
else
type.with_nonreturn_void? # steep:ignore DeprecatedReference
type.with_nonreturn_void?
end
end
end
Expand Down Expand Up @@ -530,7 +530,7 @@ def has_classish_type?
end

def with_nonreturn_void?
each_type.any? {|type| type.with_nonreturn_void? } # steep:ignore DeprecatedReference
each_type.any? {|type| type.with_nonreturn_void? }
end
end

Expand Down Expand Up @@ -648,7 +648,7 @@ def has_classish_type?
end

def with_nonreturn_void?
each_type.any? {|type| type.with_nonreturn_void? } # steep:ignore DeprecatedReference
each_type.any? {|type| type.with_nonreturn_void? }
end
end

Expand Down Expand Up @@ -734,7 +734,7 @@ def has_classish_type?
end

def with_nonreturn_void?
each_type.any? {|type| type.with_nonreturn_void? } # steep:ignore DeprecatedReference
each_type.any? {|type| type.with_nonreturn_void? }
end
end

Expand Down Expand Up @@ -825,7 +825,7 @@ def has_classish_type?
end

def with_nonreturn_void?
each_type.any? {|type| type.with_nonreturn_void? } # steep:ignore DeprecatedReference
each_type.any? {|type| type.with_nonreturn_void? }
end
end

Expand Down Expand Up @@ -908,7 +908,7 @@ def has_classish_type?
end

def with_nonreturn_void?
each_type.any? {|type| type.with_nonreturn_void? } # steep:ignore DeprecatedReference
each_type.any? {|type| type.with_nonreturn_void? }
end
end

Expand Down Expand Up @@ -1278,13 +1278,13 @@ def has_classish_type?
end

def with_nonreturn_void?
if each_param.any? {|param| param.type.with_nonreturn_void? } # steep:ignore DeprecatedReference
if each_param.any? {|param| param.type.with_nonreturn_void? }
true
else
if return_type.is_a?(Bases::Void)
false
else
return_type.with_nonreturn_void? # steep:ignore DeprecatedReference
return_type.with_nonreturn_void?
end
end
end
Expand Down Expand Up @@ -1557,11 +1557,11 @@ def has_classish_type?
end

def with_nonreturn_void?
if type.with_nonreturn_void? || self_type&.with_nonreturn_void? # steep:ignore DeprecatedReference
if type.with_nonreturn_void? || self_type&.with_nonreturn_void?
true
else
if block = block()
block.type.with_nonreturn_void? || block.self_type&.with_nonreturn_void? || false # steep:ignore DeprecatedReference
block.type.with_nonreturn_void? || block.self_type&.with_nonreturn_void? || false
else
false
end
Expand Down
6 changes: 3 additions & 3 deletions sig/unit_test/with_aliases.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ module RBS
def with_int: (?Integer value) { (int) -> void } -> void
| (?Integer value) -> WithEnum[int]

# Yields `::float` objects
# Yields `::_ToF` objects
#
def with_float: (?Float value) { (float) -> void } -> void
| (?Float value) -> WithEnum[float]
def with_float: (?Float value) { (_ToF) -> void } -> void
| (?Float value) -> WithEnum[_ToF]

# Yields `::string` objects
#
Expand Down
4 changes: 2 additions & 2 deletions steep/Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "rbs", "~> 3.9"
gem "steep", "~> 1.10"
gem "rbs"
gem "steep"
gem "ruby-lsp"
gem "test-unit"
41 changes: 8 additions & 33 deletions steep/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,41 +1,18 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (8.1.3.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
json
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.3)
base64 (0.3.0)
bigdecimal (4.1.2)
concurrent-ruby (1.3.8)
connection_pool (3.0.2)
csv (3.3.6)
drb (2.2.3)
ffi (1.17.4)
fileutils (1.8.0)
i18n (1.15.2)
concurrent-ruby (~> 1.0)
json (2.21.2)
language_server-protocol (3.17.0.6)
listen (3.10.0)
logger
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
minitest (6.0.6)
drb (~> 2.0)
prism (~> 1.5)
mutex_m (0.3.0)
parser (3.3.12.0)
ast (~> 2.4.1)
racc
Expand All @@ -46,27 +23,27 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rbs (3.10.4)
rbs (4.2.0)
logger
prism (>= 1.6.0)
tsort
ruby-lsp (0.26.11)
language_server-protocol (~> 3.17.0)
prism (>= 1.2, < 2.0)
rbs (>= 3, < 5)
securerandom (0.4.1)
steep (1.10.0)
activesupport (>= 5.1)
steep (2.1.0)
concurrent-ruby (>= 1.1.10)
csv (>= 3.0.9)
fileutils (>= 1.1.0)
json (>= 2.1.0)
language_server-protocol (>= 3.17.0.4, < 4.0)
listen (~> 3.0)
logger (>= 1.3.0)
mutex_m (>= 0.3.0)
parser (>= 3.1)
parser (>= 3.2)
prism (>= 0.25.0)
rainbow (>= 2.2.2, < 4.0)
rbs (~> 3.9)
rbs (~> 4.2)
securerandom (>= 0.1)
strscan (>= 1.0.0)
terminal-table (>= 2, < 5)
Expand All @@ -77,8 +54,6 @@ GEM
test-unit (3.7.8)
power_assert
tsort (0.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
Expand All @@ -88,9 +63,9 @@ PLATFORMS
ruby

DEPENDENCIES
rbs (~> 3.9)
rbs
ruby-lsp
steep (~> 1.10)
steep
test-unit

BUNDLED WITH
Expand Down
9 changes: 0 additions & 9 deletions steep/patch.rbs

This file was deleted.

Loading