Skip to content

Commit 166381e

Browse files
fix: bump sorbet version and fix new type errors from the breaking change
1 parent 77d162a commit 166381e

23 files changed

Lines changed: 140 additions & 302 deletions

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Naming/ClassAndModuleCamelCase:
149149
Naming/MethodParameterName:
150150
Enabled: false
151151

152-
Naming/PredicateName:
152+
Naming/PredicatePrefix:
153153
Exclude:
154154
- "**/*.rbi"
155155

Gemfile.lock

Lines changed: 51 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ PATH
1717
GEM
1818
remote: https://rubygems.org/
1919
specs:
20-
activesupport (8.0.2)
20+
activesupport (8.0.2.1)
2121
base64
2222
benchmark (>= 0.3)
2323
bigdecimal
@@ -33,45 +33,50 @@ GEM
3333
addressable (2.8.7)
3434
public_suffix (>= 2.0.2, < 7.0)
3535
ast (2.4.3)
36-
async (2.24.0)
36+
async (2.27.3)
3737
console (~> 1.29)
3838
fiber-annotation
39-
io-event (~> 1.9)
39+
io-event (~> 1.11)
4040
metrics (~> 0.12)
4141
traces (~> 0.15)
42-
base64 (0.2.0)
43-
benchmark (0.4.0)
44-
bigdecimal (3.1.9)
42+
base64 (0.3.0)
43+
benchmark (0.4.1)
44+
bigdecimal (3.2.2)
4545
concurrent-ruby (1.3.5)
4646
connection_pool (2.5.3)
47-
console (1.30.2)
47+
console (1.33.0)
4848
fiber-annotation
4949
fiber-local (~> 1.1)
5050
json
5151
crack (1.0.0)
5252
bigdecimal
5353
rexml
54-
csv (3.3.4)
55-
drb (2.2.1)
54+
csv (3.3.5)
55+
drb (2.2.3)
5656
erubi (1.13.1)
57+
ffi (1.17.2-aarch64-linux-gnu)
58+
ffi (1.17.2-aarch64-linux-musl)
59+
ffi (1.17.2-arm64-darwin)
60+
ffi (1.17.2-x86_64-darwin)
5761
ffi (1.17.2-x86_64-linux-gnu)
62+
ffi (1.17.2-x86_64-linux-musl)
5863
fiber-annotation (0.2.0)
5964
fiber-local (1.1.0)
6065
fiber-storage
6166
fiber-storage (1.0.1)
6267
fileutils (1.7.3)
63-
hashdiff (1.1.2)
68+
hashdiff (1.2.0)
6469
i18n (1.14.7)
6570
concurrent-ruby (~> 1.0)
66-
io-event (1.10.0)
67-
json (2.11.3)
68-
language_server-protocol (3.17.0.4)
71+
io-event (1.11.2)
72+
json (2.13.2)
73+
language_server-protocol (3.17.0.5)
6974
lint_roller (1.1.0)
7075
listen (3.9.0)
7176
rb-fsevent (~> 0.10, >= 0.10.3)
7277
rb-inotify (~> 0.9, >= 0.9.10)
7378
logger (1.7.0)
74-
metrics (0.12.2)
79+
metrics (0.13.0)
7580
minitest (5.25.5)
7681
minitest-focus (1.4.0)
7782
minitest (>= 4, < 6)
@@ -84,54 +89,56 @@ GEM
8489
mutex_m (0.3.0)
8590
netrc (0.11.0)
8691
parallel (1.27.0)
87-
parser (3.3.8.0)
92+
parser (3.3.9.0)
8893
ast (~> 2.4.1)
8994
racc
9095
prettier_print (1.2.1)
9196
prism (1.4.0)
9297
public_suffix (6.0.2)
9398
racc (1.8.1)
9499
rainbow (3.1.1)
95-
rake (13.2.1)
100+
rake (13.3.0)
96101
rb-fsevent (0.11.2)
97102
rb-inotify (0.11.1)
98103
ffi (~> 1.0)
99-
rbi (0.3.2)
104+
rbi (0.3.6)
100105
prism (~> 1.0)
101106
rbs (>= 3.4.4)
102-
sorbet-runtime (>= 0.5.9204)
103-
rbs (3.9.2)
107+
rbs (3.9.4)
104108
logger
105109
redcarpet (3.6.1)
106-
regexp_parser (2.10.0)
110+
regexp_parser (2.11.2)
107111
rexml (3.4.1)
108-
rubocop (1.75.5)
112+
rubocop (1.79.2)
109113
json (~> 2.3)
110114
language_server-protocol (~> 3.17.0.2)
111115
lint_roller (~> 1.1.0)
112116
parallel (~> 1.10)
113117
parser (>= 3.3.0.2)
114118
rainbow (>= 2.2.2, < 4.0)
115119
regexp_parser (>= 2.9.3, < 3.0)
116-
rubocop-ast (>= 1.44.0, < 2.0)
120+
rubocop-ast (>= 1.46.0, < 2.0)
117121
ruby-progressbar (~> 1.7)
118122
unicode-display_width (>= 2.4.0, < 4.0)
119-
rubocop-ast (1.44.1)
123+
rubocop-ast (1.46.0)
120124
parser (>= 3.3.7.2)
121125
prism (~> 1.4)
122126
ruby-progressbar (1.13.0)
123127
securerandom (0.4.1)
124-
sorbet (0.5.12067)
125-
sorbet-static (= 0.5.12067)
126-
sorbet-runtime (0.5.12067)
127-
sorbet-static (0.5.12067-x86_64-linux)
128-
sorbet-static-and-runtime (0.5.12067)
129-
sorbet (= 0.5.12067)
130-
sorbet-runtime (= 0.5.12067)
131-
spoom (1.6.1)
128+
sorbet (0.5.12424)
129+
sorbet-static (= 0.5.12424)
130+
sorbet-runtime (0.5.12424)
131+
sorbet-static (0.5.12424-aarch64-linux)
132+
sorbet-static (0.5.12424-universal-darwin)
133+
sorbet-static (0.5.12424-x86_64-linux)
134+
sorbet-static-and-runtime (0.5.12424)
135+
sorbet (= 0.5.12424)
136+
sorbet-runtime (= 0.5.12424)
137+
spoom (1.6.3)
132138
erubi (>= 1.10.0)
133139
prism (>= 0.28.0)
134-
rbi (>= 0.2.3)
140+
rbi (>= 0.3.3)
141+
rexml (>= 3.2.6)
135142
sorbet-static-and-runtime (>= 0.5.10187)
136143
thor (>= 0.19.2)
137144
steep (1.10.0)
@@ -152,7 +159,7 @@ GEM
152159
terminal-table (>= 2, < 5)
153160
uri (>= 0.12.0)
154161
strscan (3.1.5)
155-
syntax_tree (6.2.0)
162+
syntax_tree (6.3.0)
156163
prettier_print (>= 1.2.0)
157164
tapioca (0.16.11)
158165
benchmark
@@ -166,11 +173,11 @@ GEM
166173
yard-sorbet
167174
terminal-table (4.0.0)
168175
unicode-display_width (>= 1.1.1, < 4)
169-
thor (1.3.2)
170-
traces (0.15.2)
176+
thor (1.4.0)
177+
traces (0.17.0)
171178
tzinfo (2.0.6)
172179
concurrent-ruby (~> 1.0)
173-
unicode-display_width (3.1.4)
180+
unicode-display_width (3.1.5)
174181
unicode-emoji (~> 4.0, >= 4.0.4)
175182
unicode-emoji (4.0.4)
176183
uri (1.0.3)
@@ -185,7 +192,14 @@ GEM
185192
yard
186193

187194
PLATFORMS
188-
x86_64-linux
195+
aarch64-linux
196+
aarch64-linux-gnu
197+
aarch64-linux-musl
198+
arm64-darwin
199+
universal-darwin
200+
x86_64-darwin
201+
x86_64-linux-gnu
202+
x86_64-linux-musl
189203

190204
DEPENDENCIES
191205
async

lib/finch_api/internal/transport/pooled_net_requester.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,7 @@ def initialize(size: self.class::DEFAULT_MAX_CONNECTIONS)
193193
end
194194

195195
define_sorbet_constant!(:Request) do
196-
T.type_alias do
197-
{
198-
method: Symbol,
199-
url: URI::Generic,
200-
headers: T::Hash[String, String],
201-
body: T.anything,
202-
deadline: Float
203-
}
204-
end
196+
T.type_alias { {method: Symbol, url: URI::Generic, headers: T::Hash[String, String], body: T.anything, deadline: Float} }
205197
end
206198
end
207199
end

lib/finch_api/internal/type/base_model.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,7 @@ def fields
6464
setter = :"#{name_sym}="
6565
api_name = info.fetch(:api_name, name_sym)
6666
nilable = info.fetch(:nil?, false)
67-
const = if required && !nilable
68-
info.fetch(
69-
:const,
70-
FinchAPI::Internal::OMIT
71-
)
72-
else
73-
FinchAPI::Internal::OMIT
74-
end
67+
const = required && !nilable ? info.fetch(:const, FinchAPI::Internal::OMIT) : FinchAPI::Internal::OMIT
7568

7669
[name_sym, setter].each { undef_method(_1) } if known_fields.key?(name_sym)
7770

lib/finch_api/internal/util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class << self
244244
#
245245
# @return [String]
246246
def uri_origin(uri)
247-
"#{uri.scheme}://#{uri.host}#{uri.port == uri.default_port ? '' : ":#{uri.port}"}"
247+
"#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
248248
end
249249

250250
# @api private

0 commit comments

Comments
 (0)