Skip to content

Commit f636d17

Browse files
authored
Ignore InsufficientKeywordArguments when calling create(**item) (#482)
This change ignores Steep errors about arguments in the webhook parser. Other errors are not ignored. There are known issues, such as using `string.create(...)` or trying to use classes not having a `create` function. Other errors are kept to be thrown when we run `bundle exec steep check`.
1 parent 9d73896 commit f636d17

68 files changed

Lines changed: 80 additions & 80 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

generator/src/main/resources/line-bot-sdk-ruby-generator/model.pebble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ module Line
7474
{% if property.isArray -%}
7575
@{{ property.name }} = {{ property.name }}{{ property.required ? '' : '&' }}.map do |item|
7676
if item.is_a?(Hash)
77-
Line::Bot::V2::{{ packageName | camelize }}::{{ property.complexType }}.create(**item)
77+
Line::Bot::V2::{{ packageName | camelize }}::{{ property.complexType }}.create(**item) # steep:ignore InsufficientKeywordArguments
7878
else
7979
item
8080
end

lib/line/bot/v2/channel_access_token/model/channel_access_token_key_ids_response.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def initialize(
2626

2727
@kids = kids.map do |item|
2828
if item.is_a?(Hash)
29-
Line::Bot::V2::ChannelAccessToken::string.create(**item)
29+
Line::Bot::V2::ChannelAccessToken::string.create(**item) # steep:ignore InsufficientKeywordArguments
3030
else
3131
item
3232
end

lib/line/bot/v2/insight/model/error_response.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def initialize(
3131
@message = message
3232
@details = details&.map do |item|
3333
if item.is_a?(Hash)
34-
Line::Bot::V2::Insight::ErrorDetail.create(**item)
34+
Line::Bot::V2::Insight::ErrorDetail.create(**item) # steep:ignore InsufficientKeywordArguments
3535
else
3636
item
3737
end

lib/line/bot/v2/insight/model/get_friends_demographics_response.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,35 +52,35 @@ def initialize(
5252
@available = available
5353
@genders = genders&.map do |item|
5454
if item.is_a?(Hash)
55-
Line::Bot::V2::Insight::GenderTile.create(**item)
55+
Line::Bot::V2::Insight::GenderTile.create(**item) # steep:ignore InsufficientKeywordArguments
5656
else
5757
item
5858
end
5959
end
6060
@ages = ages&.map do |item|
6161
if item.is_a?(Hash)
62-
Line::Bot::V2::Insight::AgeTile.create(**item)
62+
Line::Bot::V2::Insight::AgeTile.create(**item) # steep:ignore InsufficientKeywordArguments
6363
else
6464
item
6565
end
6666
end
6767
@areas = areas&.map do |item|
6868
if item.is_a?(Hash)
69-
Line::Bot::V2::Insight::AreaTile.create(**item)
69+
Line::Bot::V2::Insight::AreaTile.create(**item) # steep:ignore InsufficientKeywordArguments
7070
else
7171
item
7272
end
7373
end
7474
@app_types = app_types&.map do |item|
7575
if item.is_a?(Hash)
76-
Line::Bot::V2::Insight::AppTypeTile.create(**item)
76+
Line::Bot::V2::Insight::AppTypeTile.create(**item) # steep:ignore InsufficientKeywordArguments
7777
else
7878
item
7979
end
8080
end
8181
@subscription_periods = subscription_periods&.map do |item|
8282
if item.is_a?(Hash)
83-
Line::Bot::V2::Insight::SubscriptionPeriodTile.create(**item)
83+
Line::Bot::V2::Insight::SubscriptionPeriodTile.create(**item) # steep:ignore InsufficientKeywordArguments
8484
else
8585
item
8686
end

lib/line/bot/v2/insight/model/get_message_event_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ def initialize(
3737
@overview = overview.is_a?(Line::Bot::V2::Insight::GetMessageEventResponseOverview) || overview.nil? ? overview : Line::Bot::V2::Insight::GetMessageEventResponseOverview.create(**overview) # steep:ignore
3838
@messages = messages&.map do |item|
3939
if item.is_a?(Hash)
40-
Line::Bot::V2::Insight::GetMessageEventResponseMessage.create(**item)
40+
Line::Bot::V2::Insight::GetMessageEventResponseMessage.create(**item) # steep:ignore InsufficientKeywordArguments
4141
else
4242
item
4343
end
4444
end
4545
@clicks = clicks&.map do |item|
4646
if item.is_a?(Hash)
47-
Line::Bot::V2::Insight::GetMessageEventResponseClick.create(**item)
47+
Line::Bot::V2::Insight::GetMessageEventResponseClick.create(**item) # steep:ignore InsufficientKeywordArguments
4848
else
4949
item
5050
end

lib/line/bot/v2/insight/model/get_statistics_per_unit_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ def initialize(
3737
@overview = overview.is_a?(Line::Bot::V2::Insight::GetStatisticsPerUnitResponseOverview) ? overview : Line::Bot::V2::Insight::GetStatisticsPerUnitResponseOverview.create(**overview) # steep:ignore
3838
@messages = messages.map do |item|
3939
if item.is_a?(Hash)
40-
Line::Bot::V2::Insight::GetStatisticsPerUnitResponseMessage.create(**item)
40+
Line::Bot::V2::Insight::GetStatisticsPerUnitResponseMessage.create(**item) # steep:ignore InsufficientKeywordArguments
4141
else
4242
item
4343
end
4444
end
4545
@clicks = clicks.map do |item|
4646
if item.is_a?(Hash)
47-
Line::Bot::V2::Insight::GetStatisticsPerUnitResponseClick.create(**item)
47+
Line::Bot::V2::Insight::GetStatisticsPerUnitResponseClick.create(**item) # steep:ignore InsufficientKeywordArguments
4848
else
4949
item
5050
end

lib/line/bot/v2/liff/model/add_liff_app_request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def initialize(
5454
@permanent_link_pattern = permanent_link_pattern
5555
@scope = scope&.map do |item|
5656
if item.is_a?(Hash)
57-
Line::Bot::V2::Liff::LiffScope.create(**item)
57+
Line::Bot::V2::Liff::LiffScope.create(**item) # steep:ignore InsufficientKeywordArguments
5858
else
5959
item
6060
end

lib/line/bot/v2/liff/model/get_all_liff_apps_response.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def initialize(
2424

2525
@apps = apps&.map do |item|
2626
if item.is_a?(Hash)
27-
Line::Bot::V2::Liff::LiffApp.create(**item)
27+
Line::Bot::V2::Liff::LiffApp.create(**item) # steep:ignore InsufficientKeywordArguments
2828
else
2929
item
3030
end

lib/line/bot/v2/liff/model/liff_app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def initialize(
5959
@permanent_link_pattern = permanent_link_pattern
6060
@scope = scope&.map do |item|
6161
if item.is_a?(Hash)
62-
Line::Bot::V2::Liff::LiffScope.create(**item)
62+
Line::Bot::V2::Liff::LiffScope.create(**item) # steep:ignore InsufficientKeywordArguments
6363
else
6464
item
6565
end

lib/line/bot/v2/liff/model/update_liff_app_request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def initialize(
5454
@permanent_link_pattern = permanent_link_pattern
5555
@scope = scope&.map do |item|
5656
if item.is_a?(Hash)
57-
Line::Bot::V2::Liff::LiffScope.create(**item)
57+
Line::Bot::V2::Liff::LiffScope.create(**item) # steep:ignore InsufficientKeywordArguments
5858
else
5959
item
6060
end

0 commit comments

Comments
 (0)