Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #127 +/- ##
==========================================
- Coverage 75.71% 72.13% -3.59%
==========================================
Files 6 6
Lines 1149 994 -155
==========================================
- Hits 870 717 -153
+ Misses 279 277 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR drops support for Python versions earlier than 3.10 and updates the codebase to use Python 3.10+ features. The main changes include:
- Updated minimum Python version requirement from 3.8 to 3.10
- Added
strict=Trueparameter tozip()calls throughout the codebase (a feature introduced in Python 3.10) - Migrated
Callableimport fromtypingtocollections.abc(recommended for Python 3.9+)
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Removed Python 3.8 and 3.9 classifiers; updated requires-python to >=3.10 |
| src/fronts/_semiinfinite.py | Migrated Callable import from typing to collections.abc within TYPE_CHECKING block |
| symbolic/generate.py | Added strict=True to zip() calls (contains a bug with infinite generator) |
| tests/test_rootfinding/test_bisect.py | Added strict=True to zip() call for length validation |
| tests/test_rootfinding/checkobj.py | Added strict=True to multiple zip() calls in assertion helpers |
| examples/1INFILTR/validation.py | Added strict=True to zip() calls iterating over time series data |
| examples/1INFILTR/solve.py | Added strict=True to zip() calls iterating over validation data |
| README.md | Updated documentation to reflect Python 3.10 minimum requirement and refreshed example output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
|
||
| deriv_names = [name for name, _ in zip(_derivative_names(var), range(3))] | ||
| deriv_names = [ | ||
| name for name, _ in zip(_derivative_names(var), range(3), strict=True) |
There was a problem hiding this comment.
The strict=True parameter will cause a ValueError here. The _derivative_names(var) function is an infinite generator (it uses itertools.count(start=2)), while range(3) produces exactly 3 values. When using strict=True, Python checks that all iterables have the same length, and will raise an error because one iterator is infinite.
To fix this, either remove strict=True from this zip call (keeping it on line 76 where both iterables have length 3), or use itertools.islice(_derivative_names(var), 3) instead of zipping with range(3).
| name for name, _ in zip(_derivative_names(var), range(3), strict=True) | |
| name for name, _ in zip(itertools.islice(_derivative_names(var), 3), range(3)) |
No description provided.