Skip to content

Some minor type fixes/clean ups#322

Open
NoodlesNZ wants to merge 1 commit intoOWASP:masterfrom
NoodlesNZ:fix-type-checking
Open

Some minor type fixes/clean ups#322
NoodlesNZ wants to merge 1 commit intoOWASP:masterfrom
NoodlesNZ:fix-type-checking

Conversation

@NoodlesNZ
Copy link
Copy Markdown
Contributor

Applies the valid type fixes from #313, dropping changes that were superseded by the Pydantic refactor in #320.

Applied:

  • flows.py: Fix req_reply return type annotation ((DF, DF) → tuple[DF, DF]) and reply return type (DF → tuple[DF, DF])
  • template_engine.py: Rename format_field parameter spec → format_spec to match string.Formatter base class signature
  • pytm.py: Import PydanticUndefined from pydantic_core instead of the private pydantic.fields module
  • tm.py: Declare _duplicate_ignored_attrs as a ClassVar rather than monkey-patching it at module level

Dropped (no longer applicable):

  • varBool string-to-bool coercion — varBool is now a plain type alias; Pydantic handles coercion
  • DataSet.str None guard — DataSet was rewritten in Refactor models to Pydantic #320 with a _names index that is already safe
  • DataSet generic type parameterization — superseded by the new DataSet implementation in base.py

Tests
All tests passing, no additional code coverage needed.

@NoodlesNZ NoodlesNZ requested a review from izar as a code owner April 15, 2026 09:58
Copy link
Copy Markdown
Collaborator

@izar izar left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

2 participants