Remove strict=True parameter from zip() calls#6
Merged
CameronScarpati merged 2 commits intomainfrom Mar 12, 2026
Merged
Conversation
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
a2e0cd6 to
845dcf5
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removed the
strict=Trueparameter from allzip()function calls across the codebase. This parameter was introduced in Python 3.10 to raise aValueErrorwhen iterables have different lengths, but its removal simplifies the code and improves compatibility.Changes
dashboard/app.py: Removed
strict=Truefrom twozip()calls in_generate_placeholder()functionzip(T_values, svi_configs)zip(strikes, iv_true)dashboard/components/term_structure.py: Removed
strict=Truefrom onezip()call inrender_term_structure()functionzip(param_names, positions)scripts/generate_synthetic_data.py: Removed
strict=Truefrom onezip()call inmain()functionzip(expiries, dte_days)tests/conftest.py: Removed
strict=Truefrom onezip()call inmake_synthetic_chain()functionzip(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