Add project-level default configuration for black to pyproject.toml#3660
Add project-level default configuration for black to pyproject.toml#3660blnicho merged 3 commits intoPyomo:mainfrom
Conversation
|
This is great. One question: does it also mean that we can remove the command line options from the GHA testing workflows? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3660 +/- ##
=======================================
Coverage 89.05% 89.05%
=======================================
Files 890 890
Lines 102617 102617
=======================================
+ Hits 91384 91386 +2
+ Misses 11233 11231 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I tried on another branch and it looks like it works correctly. Should I add that to this PR too? I guess it would be redundant not to, but on the other hand there's no harm in being excessively verbose in a script. |
|
@sadavis1: yes: I think adding that to this PR makes sense. Leaving it in the driver scripts runs the risk of inconsistency (where someone later changes one and forgets to change the other). |
|
Sure. I'll also edit contribution_guide.rst in the docs so we don't instruct people to type more than they need to. |
Fixes # (n/a)
Summary/Motivation:
Make it easier to use black and harder to accidentally mess it up
Changes proposed in this PR:
Add [tool.black] section to pyproject.toml. This will cause a command-line invocation like
black .to correctly use Pyomo's black options without needing to set them yourself.Notes:
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: