Skip to content

Commit

Permalink
Merge pull request #2213 from Shopify/at-fix-annotations
Browse files Browse the repository at this point in the history
Fix `fetch_annotation` signature
  • Loading branch information
Morriar authored Feb 21, 2025
2 parents 08962eb + 23fa10b commit f3b7011
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit f3b7011

Please sign in to comment.