Skip to content

fix: 7 - define inflow_t before branch so it is always assigned - #777

Merged
daniel-rdt merged 3 commits into
masterfrom
fix/security-fix-7
Jul 7, 2026
Merged

fix: 7 - define inflow_t before branch so it is always assigned#777
daniel-rdt merged 3 commits into
masterfrom
fix/security-fix-7

Conversation

@daniel-rdt

@daniel-rdt daniel-rdt commented Jul 2, 2026

Copy link
Copy Markdown
Member

Changes proposed in this Pull Request

This PR addresses a pylint inconsistency in add_electricity in attach_hydro where inflow_t is only defined in a branch but used outside of it. This PR makes this explicit by defining inflow_t as an empty Dataframe before the branch. This also means an existing pylint: disable=E0606 could be removed.

Tasks

  • Possibly upstream this change as the related code is not open-tyndp specific

Workflow

Open issues

  • Failing CI due to https error

Notes

Checklist

  • Security scan(s) show no high-severity bugs, critical vulnerabilities, or exposed secrets.
  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to pixi.toml (using pixi add <dependency-name>).
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Changes in configuration options are added in config/test/*.yaml.
  • The multiple weather/climate years test is passing locally (using pixi run -e open-tyndp tyndp-cyears-test).
  • Open-TYNDP SPDX license header added to all touched files.
  • For new data sources or versions, these instructions have been followed.
  • New rules are documented in the appropriate doc/*.rst files.
  • A release note doc/release_notes.rst is added.
  • Major features are documented with up-to-date information in doc/index.rst.
  • Module docstrings added to new Python scripts.

@daniel-rdt daniel-rdt self-assigned this Jul 2, 2026
@daniel-rdt daniel-rdt added SB Scenario Building CBA Cost Benefit Analysis labels Jul 2, 2026
@daniel-rdt daniel-rdt changed the title fix: define inflow_t before branch so it is always assigned fix: 7 - define inflow_t before branch so it is always assigned Jul 2, 2026
@daniel-rdt
daniel-rdt marked this pull request as ready for review July 2, 2026 15:54
@daniel-rdt
daniel-rdt requested a review from tgilon July 2, 2026 15:55

@tgilon tgilon 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, probably good to upstream

Comment thread doc/release_notes.rst Outdated
@tgilon tgilon added security and removed SB Scenario Building CBA Cost Benefit Analysis labels Jul 6, 2026
# Conflicts:
#	doc/release_notes.rst
@daniel-rdt
daniel-rdt merged commit 3ef4083 into master Jul 7, 2026
9 checks passed
@daniel-rdt
daniel-rdt deleted the fix/security-fix-7 branch July 7, 2026 09:59
@daniel-rdt

Copy link
Copy Markdown
Member Author

Upstream PR opened in PyPSA#2224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants