-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix traceback raised on an expression list assignment
When there is an assignment using a pattern_list and expression_list, the current code will iterate through each assignment. However, the current code assumes it can use context['node'], which is not the expected node during the parse. Signed-off-by: Eric Brown <eric.brown@securesauce.dev>
- Loading branch information
Showing
4 changed files
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
import torch | ||
import ssl | ||
|
||
|
||
torch.tensor([[0.1, 1.2], [2.2, 3.1], [4.9, 5.2]]) | ||
x = torch.tensor([[0.1, 1.2], [2.2, 3.1], [4.9, 5.2]]) | ||
b, *_, device = *x.shape, x.device | ||
ssl_ctx1, ssl_ctx2 = ssl.SSLContext(), ssl.SSLContext() |
6 changes: 6 additions & 0 deletions
6
tests/unit/parsers/examples/expression_list_assignment_uneven.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import torch | ||
|
||
|
||
torch.tensor([[0.1, 1.2], [2.2, 3.1], [4.9, 5.2]]) | ||
x = torch.tensor([[0.1, 1.2], [2.2, 3.1], [4.9, 5.2]]) | ||
b, *_, device = *x.shape, x.device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters