Unifying the style checkers#196
Conversation
…es which git / VS Code are marking as in conflict. Annoyingly, this seems to have introduced a bug as well.
…esolving clashes. But looking at it, I really can't fathom out 'how'
…n't edited this file...
t00sa
left a comment
There was a problem hiding this comment.
Seems reasonable. I've made a few comments in-line.
Although this isn't in the scope of the present PR, have you considered moving the command line code, i.e. everything from L611 to the end of the file, out into a __main__.py file? This would allow you to do something like python -m script_umdp3_checker - assuming that the clone of SimSys_Scripts is in your python path - to run the checker as a command while still keeping it as a separate library.
Co-authored-by: Sam Clarke-Green <74185251+t00sa@users.noreply.github.com>
Co-authored-by: Sam Clarke-Green <74185251+t00sa@users.noreply.github.com>
|
Having been forced to think about the intention on those function arguments (Default mutable instance in a function signature ?), I've made most of them required. |
t00sa
left a comment
There was a problem hiding this comment.
Thanks, looks good. On to Erica for CR.
ericaneininger
left a comment
There was a problem hiding this comment.
Thanks, I'm happy with this.
* Yet another weird round of having to repeatedly accept the same changes which git / VS Code are marking as in conflict. Annoyingly, this seems to have introduced a bug as well. * Fixing issue with external runners not establishing properly. * Fixing an error that seems to have crept in during merging main and resolving clashes. But looking at it, I really can't fathom out 'how' * Where do these line length errors in the linter(s) come from - I haven't edited this file... * quick "improvement" to the error reporting in one of the tests * Why am I constantly having to re-impliment fixes/tidying I'm sure I've done before. * And now ruff_format wants to change them back again... * reviewer suggestion : start enumeration at 1 Co-authored-by: Sam Clarke-Green <74185251+t00sa@users.noreply.github.com> * reviewer suggestion : start enumeration at 1, remove +1 from log Co-authored-by: Sam Clarke-Green <74185251+t00sa@users.noreply.github.com> * Reviewer suggested changes : "Default mutable instance in a function signature" --------- Co-authored-by: Sam Clarke-Green <74185251+t00sa@users.noreply.github.com>
PR Summary
Sci/Tech Reviewer: @t00sa
Code Reviewer: @ericaneininger
The Abstract class and 2 real classes setup was a bit clunky.
I thought I could merge the two into one real class, but after trying that it transpires I needed a subclass to overwrite the behaviour of the
checkmethod for external runners.Whilst I'm still struggling at times with the Linters VS Code deploys on the desktop, this change seems to have "re-discovered" a bunch of lines that are too long, in a file I'd not touched. There was a messed up "merge of main" which I presume caused this, but I'm just baffled.
Code Quality Checklist
Testing
It has been run on itself, in 'Python' mode, with no errors
In it's default 'Fortran' Mode :
It has been run on a 'um' branch with no failures.
It has been run on a um branch with VAF (Value Added Failures), where it identified the requisite failures.
It has been run on um/main , where it had a whale of a time identifying 874 files (out of 2406) with errors in them.
pytest has been run on the repository, no errors reported.
Security Considerations
AI Assistance and Attribution
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review