-
Notifications
You must be signed in to change notification settings - Fork 99
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
added lots of if allocated statements #178
Conversation
Why do we use flake8 and pylint? @marcomangano @nwu63 |
See mdolab/.github#22 for the discussion on pylint. It catches many problems that flake8 doesn't catch. Since nobody went through and fixed these problems, it's going to fail the check for pretty much all the repos, which is why it's not a required status check. |
Codecov Report
@@ Coverage Diff @@
## master #178 +/- ##
=======================================
Coverage 43.10% 43.10%
=======================================
Files 15 15
Lines 3517 3517
=======================================
Hits 1516 1516
Misses 2001 2001
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! I tested this locally and it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything here looks good to me.
Purpose
If ADflow has an issue in its init it will often try to deallocate variables that haven't been allocated yet. This will usually obscure the original error. This was particularly annoying for me since I was working on pyAeroProblem, which is used before the preprocessing has been complete.
To solve this I added lots of if (allocated(blah)) statements to prevent it from deallocating variables that don't exist yet.
Before
or
After
Type of change
Testing
Checklist
flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted