Skip to content

Return explicitly from set_start_date (CodeQL py/mixed-returns) - #42

Merged
btokarzewskidb merged 1 commit into
mainfrom
fix/codeql-mixed-returns
Dec 3, 2026
Merged

btokarzewskidb merged 1 commit into
mainfrom
fix/codeql-mixed-returns

Conversation

@btokarzewskidb

Copy link
Copy Markdown
Contributor

Fixes #41.

set_start_date in processing/esofile_time.py returned from inside a for loop, so an empty refs would fall through to an implicit None. The only caller guards on a non-empty mapping, so the helper now takes the first reference with next(iter(...)) and returns explicitly. No behaviour change.

Testing

  • uv run pytest: 234 passed
  • ruff check, ruff format --check, pylint on the file: clean
  • CodeQL not re-run locally

🤖 Generated with Claude Code

The helper returned from inside a for loop, so with an empty mapping it
would fall through and return None (CodeQL py/mixed-returns). The caller
only calls it with a non-empty mapping, so take the first reference
directly; behaviour is unchanged.

Fixes #41

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@btokarzewskidb
btokarzewskidb merged commit b0d2b16 into main Dec 3, 2026
6 checks passed
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.

CodeQL code-quality findings (local scan, 2026-11-22)

2 participants