Skip to content

refactor: fix quoting for clarity - #791

Merged
tgilon merged 2 commits into
masterfrom
refactor/fix-quotes
Jul 22, 2026
Merged

refactor: fix quoting for clarity#791
tgilon merged 2 commits into
masterfrom
refactor/fix-quotes

Conversation

@tgilon

@tgilon tgilon commented Jul 15, 2026

Copy link
Copy Markdown
Member

Closes #789.

Changes proposed in this Pull Request

This PR suggests changing the quoting patterns for clarity. However, it's legal in Python 3.12+ to reuse the same quote character inside an f-string. Since python 3.12 is implicitly required, this change is not strictly necessary.

This PR relates to PyPSA#2235.

Tasks

Workflow

Open issues

Notes

Checklist

Required:

  • Security scans show no high-severity bugs, critical vulnerabilities, or exposed secrets.
  • Changes are tested locally and behave as expected.
  • Code and workflow changes are documented.
  • A release note entry is added to doc/release_notes.md.
  • The description is human-written and any AI-generated content is marked.

If applicable:

  • Changes in configuration options are reflected in scripts/lib/validation.
  • Changes in configuration options are added to config/test/*.yaml.
  • Multiple climate years test passes locally (pixi run -e open-tyndp tyndp-cyears-test).
  • For new data sources or versions, these instructions have been followed.
  • Open-TYNDP SPDX license header is added to all touched files.
  • Module docstrings are added to new Python scripts.
  • New rules are documented in the appropriate doc/*.md files.
  • Major features are documented in doc/index.md.

@tgilon tgilon added this to the Release v0.8 milestone Jul 15, 2026
@tgilon
tgilon requested a review from daniel-rdt July 15, 2026 11:17
@tgilon tgilon self-assigned this Jul 15, 2026
@tgilon tgilon added SB Scenario Building CBA Cost Benefit Analysis labels Jul 15, 2026

@daniel-rdt daniel-rdt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I checked and couldn't find any other instances. Note, there is also no instances where it is the other way around (f'xyz{'abc'}').

I was also only able to find three instances (#1, #2, #3) where the quoting is reversed (i.e. f'abc') and they all come from upstream. All three are queries though, so could also be intentional

@tgilon
tgilon merged commit 85bb54f into master Jul 22, 2026
7 checks passed
@tgilon
tgilon deleted the refactor/fix-quotes branch July 22, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CBA Cost Benefit Analysis SB Scenario Building

Projects

None yet

Development

Successfully merging this pull request may close these issues.

f-strings in cba.smk

2 participants