Skip to content

fix(backtest): annotate scalar_one results - #102

Open
kcrmin wants to merge 1 commit into
developfrom
bugfix/sqlalchemy-21-typing
Open

kcrmin wants to merge 1 commit into
developfrom
bugfix/sqlalchemy-21-typing

Conversation

@kcrmin

@kcrmin kcrmin commented Oct 26, 2026

Copy link
Copy Markdown
Member

What and why

SQLAlchemy 2.1.0 falls inside the declared >=2.0,<3.0 range. It types Result with variadic generics, so the pinned mypy 2.3.0 now reports var-annotated on three bare scalar_one() assignments. This annotates them as int, bool and str, each checked against the schema. There is no runtime change.

Replaces #100, which is closed.

Verified

All runs on CPython 3.12.13:

  • mypy is clean on SQLAlchemy 2.1.6 and on 2.0.55.
  • ruff check and format pass.
  • gate8 on SQLAlchemy 2.1.6: 241 passed, 0 skipped.

Checklist

  • Tests pass
  • Type check passes on both SQLAlchemy lines
  • No secrets or personal data

SQLAlchemy 2.1 types Result with variadic generics, so mypy 2.3.0
reports var-annotated on bare scalar_one() assignments.
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.

1 participant