Skip to content

Remove strict=True parameter from zip() calls#6

Merged
CameronScarpati merged 2 commits intomainfrom
claude/debug-streamlit-error-9DbQ2
Mar 12, 2026
Merged

Remove strict=True parameter from zip() calls#6
CameronScarpati merged 2 commits intomainfrom
claude/debug-streamlit-error-9DbQ2

Conversation

@CameronScarpati
Copy link
Owner

Summary

Removed the strict=True parameter from all zip() function calls across the codebase. This parameter was introduced in Python 3.10 to raise a ValueError when iterables have different lengths, but its removal simplifies the code and improves compatibility.

Changes

  • dashboard/app.py: Removed strict=True from two zip() calls in _generate_placeholder() function

    • Line 122: zip(T_values, svi_configs)
    • Line 135: zip(strikes, iv_true)
  • dashboard/components/term_structure.py: Removed strict=True from one zip() call in render_term_structure() function

    • Line 98: zip(param_names, positions)
  • scripts/generate_synthetic_data.py: Removed strict=True from one zip() call in main() function

    • Line 65: zip(expiries, dte_days)
  • tests/conftest.py: Removed strict=True from one zip() call in make_synthetic_chain() function

    • Line 64: zip(expiries, dte_days)

Implementation Details

All four instances involved pairing iterables that are guaranteed to have matching lengths by their construction logic, making the strict length checking unnecessary. The removal maintains the same functionality while reducing Python version constraints.

https://claude.ai/code/session_015ytT1JAp1hacPkdaSoeN3r

The strict parameter for zip() was introduced in Python 3.10.
Remove it from all 5 call sites to support Python 3.9.

https://claude.ai/code/session_015ytT1JAp1hacPkdaSoeN3r
@CameronScarpati CameronScarpati force-pushed the claude/debug-streamlit-error-9DbQ2 branch from a2e0cd6 to 845dcf5 Compare March 12, 2026 20:10
The project targets Python >=3.10, so strict=True is valid.
Also fix import ordering, redundant f-string, and redundant
int() cast in data/download.py.

https://claude.ai/code/session_015ytT1JAp1hacPkdaSoeN3r
@CameronScarpati CameronScarpati merged commit ac7e04d into main Mar 12, 2026
4 checks passed
@CameronScarpati CameronScarpati deleted the claude/debug-streamlit-error-9DbQ2 branch March 12, 2026 20:22
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