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

Apply black to pyomo/common directory py files #2776

Merged
merged 7 commits into from
Mar 24, 2023

Conversation

mrmundt
Copy link
Contributor

@mrmundt mrmundt commented Mar 21, 2023

Fixes (Partly) #329

Summary/Motivation:

This is the first in a relatively long string of PRs to apply PEP8 standards via black to Pyomo. We are following the standard used by IDAES except that we are adding the -S option: Don't normalize string quotes or prefixes and the -C option: Don't use trailing commas as a reason to split lines.

NOTE: All changes are NFC.

Full command used: cd pyomo/common && black -S -C .

⚠️ Please squash this at merge. ⚠️

Changes proposed in this PR:

  • Apply black to the pyomo/common directory py files
  • Manually fix instances where two lines were merged and left " " or ' '

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:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@mrmundt mrmundt requested a review from blnicho March 21, 2023 16:23
@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Patch coverage: 96.18% and project coverage change: -0.01 ⚠️

Comparison is base (b6af7b0) 87.01% compared to head (31f270e) 87.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2776      +/-   ##
==========================================
- Coverage   87.01%   87.00%   -0.01%     
==========================================
  Files         763      763              
  Lines       87123    87227     +104     
==========================================
+ Hits        75807    75895      +88     
- Misses      11316    11332      +16     
Flag Coverage Δ
linux 84.01% <92.01%> (-0.01%) ⬇️
osx 73.51% <90.62%> (+<0.01%) ⬆️
other 84.00% <92.01%> (-0.20%) ⬇️
win 81.51% <94.44%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pyomo/common/__init__.py 100.00% <ø> (ø)
pyomo/common/_command.py 60.00% <ø> (ø)
pyomo/common/_common.py 0.00% <ø> (ø)
pyomo/common/envvar.py 57.14% <0.00%> (ø)
pyomo/common/factory.py 91.42% <ø> (ø)
pyomo/common/gc_manager.py 100.00% <ø> (ø)
pyomo/common/getGSL.py 0.00% <0.00%> (ø)
pyomo/common/gsl.py 91.66% <0.00%> (ø)
pyomo/common/plugin.py 0.00% <0.00%> (ø)
pyomo/common/plugins.py 100.00% <ø> (ø)
... and 27 more

... and 7 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

pyomo/common/collections/orderedset.py Outdated Show resolved Hide resolved
pyomo/common/download.py Outdated Show resolved Hide resolved
pyomo/common/env.py Outdated Show resolved Hide resolved
pyomo/common/fileutils.py Outdated Show resolved Hide resolved
pyomo/common/gsl.py Outdated Show resolved Hide resolved
pyomo/common/tests/test_download.py Outdated Show resolved Hide resolved
pyomo/common/tests/test_gc.py Outdated Show resolved Hide resolved
pyomo/common/tests/test_timing.py Show resolved Hide resolved
pyomo/common/tests/test_unittest.py Outdated Show resolved Hide resolved
pyomo/common/unittest.py Outdated Show resolved Hide resolved
@mrmundt
Copy link
Contributor Author

mrmundt commented Mar 22, 2023

⚠️ Please squash this at merge. ⚠️

@mrmundt mrmundt requested a review from blnicho March 22, 2023 21:42
@mrmundt mrmundt merged commit 69aaac0 into Pyomo:main Mar 24, 2023
@mrmundt mrmundt deleted the black/common branch July 25, 2023 17:36
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

Successfully merging this pull request may close these issues.

2 participants