Commit 7d78645
Cipher
fix(mypy): correct type-ignore codes for union attribute access in sharding test
- Line 542: Fix assert accessing .shape by changing from [index] to [union-attr]
- Line 544: Add missing type-ignore[union-attr] for f-string .shape access
- Lines 554-555: Remove unused type-ignore[index] comments on assignments
The mypy errors were caused by indexing operations returning union types that
include scalar types (int, float, etc.), which don't have a .shape attribute.
The proper fix uses type-ignore[union-attr] for attribute access, not [index].1 parent 4f332c4 commit 7d78645
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
| 542 | + | |
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | | - | |
555 | | - | |
| 554 | + | |
| 555 | + | |
556 | 556 | | |
557 | 557 | | |
0 commit comments