Skip to content

Conversation

@qoone
Copy link
Contributor

@qoone qoone commented Oct 26, 2022

python3.8以前の場合に型定義がlist[int]の様な場合エラーになるのでfrom typing import List でインポートされた先頭が大文字のListを利用するように修正

エラーが起きるパターンは以下のように明示的に配列の中身の型まで定義している場合

  • list[int]

以下の書き方は問題ない

  • list
  • List
  • List[int]

dict、tupleでも同様の問題が発生するが、grepして確認した結果List以外でエラーになる書き方はなかった

@qoone qoone requested a review from ueno-k-work October 26, 2022 15:52
@qoone qoone self-assigned this Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants