tactcomplabs / rev

RISC-V SST CPU Component
Other
17 stars 21 forks source link

Use consistent naming of options; fix flake8 warnings #316

Closed leekillough closed 1 month ago

leekillough commented 1 month ago

This change uses the same names for variables, command-line options, and SST parameters whenever possible. The main changes are:

Also remove flake8 errors in all of the Python source files. flake8 is a Python Lint. It flags things like unused imported modules, tab characters in Python files, indentation not at 4-byte multiples, incorrect spaces around colons, parentheses and commas, too long lines, extraneous semicolons at ends of lines; incorrectly formatted comments; etc.

leekillough commented 1 month ago

I ran it through the Python reindent tool to avoid any surprises. reindent keeps the original syntax but reindents the code so that it is in 4-space indentation levels. After the reindentation, I eliminated all flake8 errors. I renamed the variables as per my original comment.

leekillough commented 1 month ago

I'm good with all these changes. Is it worth putting together an updated README file and/or a separate document that describes the various potential Python parameters and their values? There are so many at this point that it might be valuable for the future stability of the simulator

I can add a flake8 test to the pre-commit script if flake8 command can be found, and it will reject commits which don't follow the flake8 rules and point out exactly what needs to be changed.