Skip to content

Fix ERROR-level basedpyright type checking issues - #313

Closed
shivachethanreddy wants to merge 1 commit into
OWASP:masterfrom
shivachethanreddy:fix-type-checking-errors
Closed

shivachethanreddy wants to merge 1 commit into
OWASP:masterfrom
shivachethanreddy:fix-type-checking-errors

Conversation

@shivachethanreddy

Copy link
Copy Markdown
Contributor

This PR fixes ERROR-level issues reported by basedpyright / pyright.

Changes include:

  • Fixing missing super().init() calls required by static analysis
  • Correcting generic container typing
  • Narrowing boolean handling so string → bool conversions are correctly understood
  • Fixing container usage that caused type errors
  • Updating pdoc_overrides to use an explicitly typed result (bool | str)

All fixes were verified locally using basedpyright.
Warnings were intentionally left out of scope.
No runtime behavior or API changes were made.

izar pushed a commit that referenced this pull request May 21, 2026
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 #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.
@izar

izar commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Applied on #322, thanks!

@izar izar closed this May 21, 2026
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