Skip to content

311 syntax#739

Merged
FabianHofmann merged 5 commits into
PyPSA:masterfrom
RobbieKiwi:feature/311-syntax
Jun 3, 2026
Merged

311 syntax#739
FabianHofmann merged 5 commits into
PyPSA:masterfrom
RobbieKiwi:feature/311-syntax

Conversation

@RobbieKiwi
Copy link
Copy Markdown
Contributor

Changes proposed in this Pull Request

Use new Python 3.11 syntax

Checklist

  • I consent to the release of this PR's code under the MIT license.

@RobbieKiwi RobbieKiwi marked this pull request as draft June 2, 2026 09:45
@FBumann
Copy link
Copy Markdown
Collaborator

FBumann commented Jun 2, 2026

Not sure how far you are atm, but +1 for the effort!

@RobbieKiwi RobbieKiwi marked this pull request as ready for review June 2, 2026 12:04
@FabianHofmann
Copy link
Copy Markdown
Collaborator

@RobbieKiwi let us know when this is ready to review

@RobbieKiwi
Copy link
Copy Markdown
Contributor Author

It's ready

@FabianHofmann
Copy link
Copy Markdown
Collaborator

@RobbieKiwi I took the freedom to make two one-liner changes and adding a release note

@FabianHofmann FabianHofmann merged commit d834810 into PyPSA:master Jun 3, 2026
19 checks passed
FBumann added a commit that referenced this pull request Jun 3, 2026
…turn

Follow-ups to #739 (Python 3.11 syntax):

- Add regression tests locking in the observable StrEnum behaviour of the
  status enums (value equality, str()/f-string rendering, isinstance(str)).
  This is the one user-visible change from the Enum -> StrEnum switch and
  was previously untested.
- SolverStatus.from_termination_condition now returns `Self` instead of the
  quoted "SolverStatus", matching its sibling `process` and
  Status.from_termination_condition, which #739 converted but missed here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FBumann added a commit that referenced this pull request Jun 3, 2026
Follow-up to #739 (Python 3.11 syntax): SolverStatus.from_termination_condition
now returns `Self` instead of the quoted "SolverStatus", matching its sibling
`process` and Status.from_termination_condition, which #739 converted but
missed here. No functional change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FabianHofmann pushed a commit that referenced this pull request Jun 3, 2026
)

Follow-up to #739 (Python 3.11 syntax): SolverStatus.from_termination_condition
now returns `Self` instead of the quoted "SolverStatus", matching its sibling
`process` and Status.from_termination_condition, which #739 converted but
missed here. No functional change.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

3 participants