Skip to content

Work around environments where IntEnum.__doc__ is None#3711

Merged
jsiirola merged 2 commits intoPyomo:mainfrom
jsiirola:intenum-doc
Aug 27, 2025
Merged

Work around environments where IntEnum.__doc__ is None#3711
jsiirola merged 2 commits intoPyomo:mainfrom
jsiirola:intenum-doc

Conversation

@jsiirola
Copy link
Copy Markdown
Member

Fixes #3710 .

Summary/Motivation:

There are apparently environments where enum.IntEnum.__doc__ is None. This works around those situations, plus does a little extra work to ensure that the docstring is rendered cleanly by Sphinx

Changes proposed in this PR:

  • Catch situation where enum.IntEnum.__doc__ is None.
  • Make more effort to ensure combined docstring is formatted (indented) correctly.

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.

@jsiirola jsiirola merged commit 0a5479f into Pyomo:main Aug 27, 2025
35 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Pyomo 6.9.4 Release Aug 27, 2025
@jsiirola jsiirola deleted the intenum-doc branch August 27, 2025 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

TypeError: can only concatenate str (not "NoneType") to str to try to Import pyomo.environ

2 participants