Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fetch_annotation signature #2213

Merged
merged 1 commit into from
Feb 21, 2025
Merged
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
5 changes: 3 additions & 2 deletions lib/tapioca/commands/annotations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def fetch_annotations(project_gems)
fetched_gems.keys.map(&:name).sort
end

sig { params(repo_uris: T::Array[String], gem_info: GemInfo).void }
sig { params(repo_uris: T::Array[String], gem_info: GemInfo).returns(T::Boolean) }
def fetch_annotation(repo_uris, gem_info)
gem_name = gem_info.name
gem_version = gem_info.version
Expand All @@ -142,14 +142,15 @@ def fetch_annotation(repo_uris, gem_info)
end

content = merge_files(gem_name, contents.compact)
return unless content
return false unless content

content = apply_typed_override(gem_name, content)
content = filter_versions(gem_version, content)
content = add_header(gem_name, content)

say("\n Fetched #{set_color(gem_name, :yellow, :bold)}", :green)
create_file(@outpath.join("#{gem_name}.rbi"), content)
true
end

sig { params(repo_uri: String, path: String).returns(T.nilable(String)) }
Expand Down
Loading