Skip to content

Commit 918389e

Browse files
fix: switch to github compatible markdown engine (#73)
1 parent 58f5ce4 commit 918389e

27 files changed

+239
-59
lines changed

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ Style/RegexpLiteral:
235235
Style/SafeNavigation:
236236
Enabled: false
237237

238+
Style/SignalException:
239+
Exclude:
240+
- Rakefile
241+
238242
# We use these sparingly, where we anticipate future branches for the
239243
# inner conditional.
240244
Style/SoleNestedConditional:

.yardopts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
--markup markdown
2+
--markup-provider redcarpet
23
--exclude /rbi
34
--exclude /sig

Gemfile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ source "https://rubygems.org"
55
gemspec
66

77
group :development do
8-
gem "async"
9-
gem "minitest"
10-
gem "minitest-focus"
11-
gem "minitest-hooks"
12-
gem "minitest-proveit"
13-
gem "minitest-rg"
148
gem "rake"
159
gem "rbs"
1610
gem "rubocop"
@@ -20,6 +14,19 @@ group :development do
2014
# TODO: using a fork for now, the prettier below has a bug
2115
gem "syntax_tree-rbs", github: "stainless-api/syntax_tree-rbs", branch: "main"
2216
gem "tapioca"
17+
end
18+
19+
group :development, :test do
20+
gem "async"
21+
gem "minitest"
22+
gem "minitest-focus"
23+
gem "minitest-hooks"
24+
gem "minitest-proveit"
25+
gem "minitest-rg"
26+
end
27+
28+
group :development, :docs do
29+
gem "redcarpet"
2330
gem "webrick"
2431
gem "yard"
2532
end

Gemfile.lock

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ GEM
2929
minitest (>= 5.1)
3030
securerandom (>= 0.3)
3131
tzinfo (~> 2.0, >= 2.0.5)
32-
ast (2.4.2)
33-
async (2.23.0)
32+
ast (2.4.3)
33+
async (2.23.1)
3434
console (~> 1.29)
3535
fiber-annotation
3636
io-event (~> 1.9)
@@ -41,11 +41,11 @@ GEM
4141
bigdecimal (3.1.9)
4242
concurrent-ruby (1.3.5)
4343
connection_pool (2.5.0)
44-
console (1.29.3)
44+
console (1.30.2)
4545
fiber-annotation
4646
fiber-local (~> 1.1)
4747
json
48-
csv (3.3.2)
48+
csv (3.3.3)
4949
drb (2.2.1)
5050
erubi (1.13.1)
5151
ffi (1.17.1)
@@ -56,16 +56,16 @@ GEM
5656
fileutils (1.7.3)
5757
i18n (1.14.7)
5858
concurrent-ruby (~> 1.0)
59-
io-event (1.9.0)
60-
json (2.10.1)
59+
io-event (1.10.0)
60+
json (2.10.2)
6161
language_server-protocol (3.17.0.4)
6262
lint_roller (1.1.0)
6363
listen (3.9.0)
6464
rb-fsevent (~> 0.10, >= 0.10.3)
6565
rb-inotify (~> 0.9, >= 0.9.10)
66-
logger (1.6.6)
67-
metrics (0.12.1)
68-
minitest (5.25.4)
66+
logger (1.7.0)
67+
metrics (0.12.2)
68+
minitest (5.25.5)
6969
minitest-focus (1.4.0)
7070
minitest (>= 4, < 6)
7171
minitest-hooks (1.5.2)
@@ -74,68 +74,73 @@ GEM
7474
minitest (> 5, < 7)
7575
minitest-rg (5.3.0)
7676
minitest (~> 5.0)
77+
mutex_m (0.3.0)
7778
netrc (0.11.0)
7879
parallel (1.26.3)
79-
parser (3.3.7.1)
80+
parser (3.3.7.4)
8081
ast (~> 2.4.1)
8182
racc
8283
prettier_print (1.2.1)
83-
prism (1.3.0)
84+
prism (1.4.0)
8485
racc (1.8.1)
8586
rainbow (3.1.1)
8687
rake (13.2.1)
8788
rb-fsevent (0.11.2)
8889
rb-inotify (0.11.1)
8990
ffi (~> 1.0)
90-
rbi (0.2.4)
91+
rbi (0.3.1)
9192
prism (~> 1.0)
93+
rbs (>= 3.4.4)
9294
sorbet-runtime (>= 0.5.9204)
93-
rbs (3.8.1)
95+
rbs (3.9.2)
9496
logger
97+
redcarpet (3.6.1)
9598
regexp_parser (2.10.0)
96-
rubocop (1.73.2)
99+
rubocop (1.75.1)
97100
json (~> 2.3)
98101
language_server-protocol (~> 3.17.0.2)
99102
lint_roller (~> 1.1.0)
100103
parallel (~> 1.10)
101104
parser (>= 3.3.0.2)
102105
rainbow (>= 2.2.2, < 4.0)
103106
regexp_parser (>= 2.9.3, < 3.0)
104-
rubocop-ast (>= 1.38.0, < 2.0)
107+
rubocop-ast (>= 1.43.0, < 2.0)
105108
ruby-progressbar (~> 1.7)
106109
unicode-display_width (>= 2.4.0, < 4.0)
107-
rubocop-ast (1.38.1)
108-
parser (>= 3.3.1.0)
110+
rubocop-ast (1.43.0)
111+
parser (>= 3.3.7.2)
112+
prism (~> 1.4)
109113
ruby-progressbar (1.13.0)
110114
securerandom (0.4.1)
111-
sorbet (0.5.11888)
112-
sorbet-static (= 0.5.11888)
113-
sorbet-runtime (0.5.11888)
114-
sorbet-static (0.5.11888-x86_64-linux)
115-
sorbet-static-and-runtime (0.5.11888)
116-
sorbet (= 0.5.11888)
117-
sorbet-runtime (= 0.5.11888)
118-
spoom (1.5.4)
115+
sorbet (0.5.11966)
116+
sorbet-static (= 0.5.11966)
117+
sorbet-runtime (0.5.11966)
118+
sorbet-static (0.5.11966-x86_64-linux)
119+
sorbet-static-and-runtime (0.5.11966)
120+
sorbet (= 0.5.11966)
121+
sorbet-runtime (= 0.5.11966)
122+
spoom (1.6.1)
119123
erubi (>= 1.10.0)
120124
prism (>= 0.28.0)
121125
rbi (>= 0.2.3)
122126
sorbet-static-and-runtime (>= 0.5.10187)
123127
thor (>= 0.19.2)
124-
steep (1.9.4)
128+
steep (1.10.0)
125129
activesupport (>= 5.1)
126130
concurrent-ruby (>= 1.1.10)
127131
csv (>= 3.0.9)
128132
fileutils (>= 1.1.0)
129133
json (>= 2.1.0)
130-
language_server-protocol (>= 3.15, < 4.0)
134+
language_server-protocol (>= 3.17.0.4, < 4.0)
131135
listen (~> 3.0)
132136
logger (>= 1.3.0)
137+
mutex_m (>= 0.3.0)
133138
parser (>= 3.1)
134139
rainbow (>= 2.2.2, < 4.0)
135-
rbs (~> 3.8)
140+
rbs (~> 3.9)
136141
securerandom (>= 0.1)
137142
strscan (>= 1.0.0)
138-
terminal-table (>= 2, < 4)
143+
terminal-table (>= 2, < 5)
139144
uri (>= 0.12.0)
140145
strscan (3.1.2)
141146
syntax_tree (6.2.0)
@@ -150,13 +155,15 @@ GEM
150155
spoom (>= 1.2.0)
151156
thor (>= 1.2.0)
152157
yard-sorbet
153-
terminal-table (3.0.2)
154-
unicode-display_width (>= 1.1.1, < 3)
158+
terminal-table (4.0.0)
159+
unicode-display_width (>= 1.1.1, < 4)
155160
thor (1.3.2)
156161
traces (0.15.2)
157162
tzinfo (2.0.6)
158163
concurrent-ruby (~> 1.0)
159-
unicode-display_width (2.6.0)
164+
unicode-display_width (3.1.4)
165+
unicode-emoji (~> 4.0, >= 4.0.4)
166+
unicode-emoji (4.0.4)
160167
uri (1.0.3)
161168
webrick (1.9.1)
162169
yard (0.9.37)
@@ -177,6 +184,7 @@ DEPENDENCIES
177184
openai!
178185
rake
179186
rbs
187+
redcarpet
180188
rubocop
181189
sorbet
182190
steep

lib/openai/type/converter.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
module OpenAI
44
module Type
5+
# rubocop:disable Metrics/ModuleLength
56
# @api private
67
module Converter
78
# rubocop:disable Lint/UnusedMethodArgument
@@ -118,6 +119,8 @@ def coerce(
118119
value,
119120
state: {strictness: true, exactness: {yes: 0, no: 0, maybe: 0}, branched: 0}
120121
)
122+
# rubocop:disable Lint/SuppressedException
123+
# rubocop:disable Metrics/BlockNesting
121124
strictness, exactness = state.fetch_values(:strictness, :exactness)
122125

123126
case target
@@ -194,6 +197,8 @@ def coerce(
194197

195198
exactness[:no] += 1
196199
value
200+
# rubocop:enable Metrics/BlockNesting
201+
# rubocop:enable Lint/SuppressedException
197202
end
198203

199204
# @api private
@@ -207,5 +212,6 @@ def dump(target, value)
207212
end
208213
end
209214
end
215+
# rubocop:enable Metrics/ModuleLength
210216
end
211217
end

rbi/lib/openai/models/audio/speech_create_params.rbi

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,15 @@ module OpenAI
5959
)
6060
.returns(T.attached_class)
6161
end
62-
def self.new(input:, model:, voice:, instructions: nil, response_format: nil, speed: nil, request_options: {})
62+
def self.new(
63+
input:,
64+
model:,
65+
voice:,
66+
instructions: nil,
67+
response_format: nil,
68+
speed: nil,
69+
request_options: {}
70+
)
6371
end
6472

6573
sig do

rbi/lib/openai/models/audio/transcription_segment.rbi

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,18 @@ module OpenAI
6262
)
6363
.returns(T.attached_class)
6464
end
65-
def self.new(id:, avg_logprob:, compression_ratio:, end_:, no_speech_prob:, seek:, start:, temperature:, text:, tokens:)
65+
def self.new(
66+
id:,
67+
avg_logprob:,
68+
compression_ratio:,
69+
end_:,
70+
no_speech_prob:,
71+
seek:,
72+
start:,
73+
temperature:,
74+
text:,
75+
tokens:
76+
)
6677
end
6778

6879
sig do

rbi/lib/openai/models/beta/threads/file_citation_delta_annotation.rbi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,14 @@ module OpenAI
5757
)
5858
.returns(T.attached_class)
5959
end
60-
def self.new(index:, end_index: nil, file_citation: nil, start_index: nil, text: nil, type: :file_citation)
60+
def self.new(
61+
index:,
62+
end_index: nil,
63+
file_citation: nil,
64+
start_index: nil,
65+
text: nil,
66+
type: :file_citation
67+
)
6168
end
6269

6370
sig do

rbi/lib/openai/models/beta/threads/runs/step_list_params.rbi

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,15 @@ module OpenAI
7373
)
7474
.returns(T.attached_class)
7575
end
76-
def self.new(thread_id:, after: nil, before: nil, include: nil, limit: nil, order: nil, request_options: {})
76+
def self.new(
77+
thread_id:,
78+
after: nil,
79+
before: nil,
80+
include: nil,
81+
limit: nil,
82+
order: nil,
83+
request_options: {}
84+
)
7785
end
7886

7987
sig do

rbi/lib/openai/models/chat/chat_completion_assistant_message_param.rbi

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,15 @@ module OpenAI
105105
)
106106
.returns(T.attached_class)
107107
end
108-
def self.new(audio: nil, content: nil, function_call: nil, name: nil, refusal: nil, tool_calls: nil, role: :assistant)
108+
def self.new(
109+
audio: nil,
110+
content: nil,
111+
function_call: nil,
112+
name: nil,
113+
refusal: nil,
114+
tool_calls: nil,
115+
role: :assistant
116+
)
109117
end
110118

111119
sig do

0 commit comments

Comments
 (0)