Skip to content

Commit

Permalink
feedback from ewu63
Browse files Browse the repository at this point in the history
  • Loading branch information
crecine committed May 1, 2024
1 parent c9f44f9 commit 1ef6b06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyoptsparse/pyOpt_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -1577,12 +1577,11 @@ def _mapContoOpt_Dict(self, conDict: Dict1DType) -> Dict1DType:
con_opt = self._mapContoOpt(con)
return self.processContoDict(con_opt, scaled=False, natural=True)

def __str__(self):
def summary_str(self, minimal_print=False):

Check warning on line 1580 in pyoptsparse/pyOpt_optimization.py

View check run for this annotation

Codecov / codecov/patch

pyoptsparse/pyOpt_optimization.py#L1580

Added line #L1580 was not covered by tests
"""
Print Structured Optimization Problem
"""
TOL = 1.0e-6
minimal_print = getattr(self, "minimal_print", True)

text = (
f"\n\nOptimization Problem -- {self.name}\n{'=' * 80}\n Objective Function: {self.objFun.__name__}\n\n"
Expand Down Expand Up @@ -1708,6 +1707,9 @@ def __str__(self):

return text

def __str__(self, minimal_print=False):

Check warning on line 1710 in pyoptsparse/pyOpt_optimization.py

View check run for this annotation

Codecov / codecov/patch

pyoptsparse/pyOpt_optimization.py#L1710

Added line #L1710 was not covered by tests
return self.summary_str(minimal_print)

def __getstate__(self) -> dict:
"""
This is used for serializing class instances.
Expand Down

0 comments on commit 1ef6b06

Please sign in to comment.