Skip to content
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

Repeated key literals in insMap dictionary in testgen.py #449

Open
jordancarlin opened this issue Feb 16, 2025 · 0 comments
Open

Repeated key literals in insMap dictionary in testgen.py #449

jordancarlin opened this issue Feb 16, 2025 · 0 comments

Comments

@jordancarlin
Copy link
Member

I was looking into enabling ruff on this repo like we did for the main cvw repo discovered the following error.

The insMap dictionary in testgen.py has several duplicate entries. These duplicate entries have different mappings, so it's not as simple as just deleting the duplicates. Error message is included below. Looks like @HamzaYusufJamal is the last one that touched this. Can you look into it?

bin/testgen.py:1947:3: F601 Dictionary key literal `'amotype'` repeated
     |
1945 |   'csrtype' : {'instructions' : csrtype, 'regconfig' : 'xcx_'},
1946 |   'csritype' : {'instructions' : csritype, 'regconfig' : 'xci_'},
1947 |   'amotype' : {'instructions' : amotype, 'regconfig' : 'xxa_'},
     |   ^^^^^^^^^ F601
1948 |   'sctype' : {'instructions' : sctype, 'regconfig' : 'xxa_'},
1949 |   'lrtype' : {'instructions' : lrtype, 'regconfig' : 'xa__'},
     |
     = help: Remove repeated key literal `'amotype'`

bin/testgen.py:1948:3: F601 Dictionary key literal `'sctype'` repeated
     |
1946 |   'csritype' : {'instructions' : csritype, 'regconfig' : 'xci_'},
1947 |   'amotype' : {'instructions' : amotype, 'regconfig' : 'xxa_'},
1948 |   'sctype' : {'instructions' : sctype, 'regconfig' : 'xxa_'},
     |   ^^^^^^^^ F601
1949 |   'lrtype' : {'instructions' : lrtype, 'regconfig' : 'xa__'},
1950 |   'rbtype' : {'instructions' : rbtype, 'regconfig' : 'xxxi', 'immlen' : 2, 'signed' : False},
     |
     = help: Remove repeated key literal `'sctype'`

bin/testgen.py:1949:3: F601 Dictionary key literal `'lrtype'` repeated
     |
1947 |   'amotype' : {'instructions' : amotype, 'regconfig' : 'xxa_'},
1948 |   'sctype' : {'instructions' : sctype, 'regconfig' : 'xxa_'},
1949 |   'lrtype' : {'instructions' : lrtype, 'regconfig' : 'xa__'},
     |   ^^^^^^^^ F601
1950 |   'rbtype' : {'instructions' : rbtype, 'regconfig' : 'xxxi', 'immlen' : 2, 'signed' : False},
1951 |   'irtype' : {'instructions' : irtype, 'regconfig' : 'xxi_', 'immlen' : 4, 'signed' : False}
     |
     = help: Remove repeated key literal `'lrtype'`

bin/testgen.py:1950:3: F601 Dictionary key literal `'rbtype'` repeated
     |
1948 |   'sctype' : {'instructions' : sctype, 'regconfig' : 'xxa_'},
1949 |   'lrtype' : {'instructions' : lrtype, 'regconfig' : 'xa__'},
1950 |   'rbtype' : {'instructions' : rbtype, 'regconfig' : 'xxxi', 'immlen' : 2, 'signed' : False},
     |   ^^^^^^^^ F601
1951 |   'irtype' : {'instructions' : irtype, 'regconfig' : 'xxi_', 'immlen' : 4, 'signed' : False}
1952 | }
     |
     = help: Remove repeated key literal `'rbtype'`

bin/testgen.py:1951:3: F601 Dictionary key literal `'irtype'` repeated
     |
1949 |   'lrtype' : {'instructions' : lrtype, 'regconfig' : 'xa__'},
1950 |   'rbtype' : {'instructions' : rbtype, 'regconfig' : 'xxxi', 'immlen' : 2, 'signed' : False},
1951 |   'irtype' : {'instructions' : irtype, 'regconfig' : 'xxi_', 'immlen' : 4, 'signed' : False}
     |   ^^^^^^^^ F601
1952 | }
     |
     = help: Remove repeated key literal `'irtype'`
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

No branches or pull requests

1 participant