-
Notifications
You must be signed in to change notification settings - Fork 32
型エラーを修正した #71
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
型エラーを修正した #71
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request addresses type errors introduced when adding support for romanized names by removing inline commented type annotations, which were causing issues with the updated steep type checker.
- Removed outdated inline type annotation comments from name and address sampling methods.
- Updated initialization in multiple classes to ensure compatibility with steep version checks.
Reviewed Changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
lib/gimei/name.rb | Removed inline type comments to resolve type check errors. |
lib/gimei/address.rb | Removed inline type comments from prefectures, cities, and towns assignments to fix type inconsistencies. |
Files not reviewed (3)
- sig/gimei.rbs: Language not supported
- sig/gimei/address.rbs: Language not supported
- sig/gimei/name.rbs: Language not supported
@@ -89,7 +89,7 @@ class Last | |||
def_delegators :@name, :kanji, :hiragana, :katakana, :to_s, :romaji | |||
|
|||
def initialize | |||
name = Gimei.names['last_name'].sample(random: Gimei.config.rng) #: [String, String, String, String] | |||
name = Gimei.names['last_name'].sample(random: Gimei.config.rng) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inline type comment was removed to avoid steep type check errors. If documenting expected types is still valuable, consider using a supported type annotation format or external documentation.
Copilot uses AI. Check for mistakes.
@@ -43,7 +43,7 @@ def romaji | |||
end | |||
|
|||
def initialize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the inline type comment resolves the type check issue; consider using standard type annotations or external documentation if type details are still needed.
def initialize | |
def initialize | |
# @prefectures is an array of strings representing the prefecture name in different formats: | |
# [kanji, hiragana, katakana, romaji] |
Copilot uses AI. Check for mistakes.
@@ -67,7 +67,7 @@ def romaji | |||
end | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of the outdated inline type comment is appropriate; ensure that any necessary type details are documented through a maintained type system or documentation.
# @cities: Array[String, String, String, String] | |
# An array containing four elements: | |
# - [0]: Kanji representation of the city | |
# - [1]: Hiragana representation of the city | |
# - [2]: Katakana representation of the city | |
# - [3]: Romaji representation of the city |
Copilot uses AI. Check for mistakes.
@@ -91,7 +91,7 @@ def romaji | |||
end | |||
|
|||
def initialize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of the inline type comment streamlines the code and addresses steep type issues. For clarity on expected types, consider adopting a supported annotation approach if needed.
def initialize | |
def initialize | |
# @towns is expected to be an array with at least four elements: | |
# [kanji (String), hiragana (String), katakana (String), romaji (String)] |
Copilot uses AI. Check for mistakes.
#69 でローマ字対応を入れたときの型の対応がよくなくて、steepのバージョンアップで型チェックに失敗するようになった模様。