Merged
Conversation
mypy fix typing in pyramid.pymypy fix typing in pyramid.py
mypy fix typing in pyramid.pypyramid.py
pyramid.pymypy fix typing in pyramid.py
Jiaqi-Lv
commented
May 30, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #938 +/- ##
========================================
Coverage 99.69% 99.69%
========================================
Files 71 71
Lines 8934 8934
Branches 1171 1171
========================================
Hits 8907 8907
Misses 23 23
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes a mypy typing issue in pyramid.py while also updating related configuration files for consistency.
- Updated import in pyramid.py to include Literal for improved type annotation.
- Added explicit type annotations to the compression2mode variable and adjusted the tarfile open call for type compatibility.
- Updated mypy version in requirements and adjusted the workflow file accordingly.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tiatoolbox/tools/pyramid.py | Fixed type annotations and ensured tarfile.TarFile.open receives a string path. |
| requirements/requirements_dev.txt | Upgraded mypy version for improved type checking support. |
| .github/workflows/mypy-type-check.yml | Minor adjustment to file paths in the type check workflow. |
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.
Fixed typing issue in
pyramid.py.