-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Labels
help-wantedWe support this change, and welcome community contributions for it.We support this change, and welcome community contributions for it.
Description
When generating sorbet/rbi/gems/[email protected] with tapioca gem code_ownership module_function defined methods will be created without signatures.
# Gemfile
source "https://rubygems.org"
gem 'tapioca', require: false, :group => [:development, :test]
gem "code_ownership", "1.37.0"Specifically
# code_ownership.rb
module CodeOwnership
module_function
sig { params(klass: T.nilable(T.any(::Module, T::Class[T.anything]))).returns(T.nilable(::CodeTeams::Team)) }
def for_class(klass); end
endwill be turned into
# code_ownership.rbi
module CodeOwnership
sig { params(klass: T.nilable(T.any(::Module, T::Class[T.anything]))).returns(T.nilable(::CodeTeams::Team)) }; def for_class(klass); end
class << self
def for_class(klass); end
end
endshould be turned into
# code_ownership.rbi
module CodeOwnership
sig { params(klass: T.nilable(T.any(::Module, T::Class[T.anything]))).returns(T.nilable(::CodeTeams::Team)); def for_class(klass); end
class << self
sig { params(klass: T.nilable(T.any(::Module, T::Class[T.anything]))).returns(T.nilable(::CodeTeams::Team)) }; def for_class(klass); end
end
endOR
# code_ownership.rbi
module CodeOwnership
module_function
sig { params(klass: T.nilable(T.any(::Module, T::Class[T.anything]))).returns(T.nilable(::CodeTeams::Team)) }; def for_class(klass); end
endI tried testing this in the rbi gem but it correctly parsed the module to the last one above
I'll gladly dive into the code to fix this if somebody could point out where this is an issue. I did some code diving as you can see already but I'm a bit lost where
Metadata
Metadata
Assignees
Labels
help-wantedWe support this change, and welcome community contributions for it.We support this change, and welcome community contributions for it.