Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR applies a small set of cleanup fixes across visualization, engine docs, package init, and documentation.
Changes:
- Removes a duplicated
__setattr__call inTileServer.update_renderer. - Fixes type annotation syntax in docstrings for
return_predictions. - Tweaks
_lazy_importerror raising and fixes minor documentation formatting (Python code examples).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tiatoolbox/visualization/tileserver.py |
Cleans up renderer update logic and adjusts annotation overlay loading branching. |
tiatoolbox/models/engine/multi_task_segmentor.py |
Docstring typing fix for return_predictions. |
tiatoolbox/models/engine/engine_abc.py |
Removes redundant/unused lines in inference and validation helpers. |
tiatoolbox/__init__.py |
Comment typo fix and updates _lazy_import error construction. |
docs/pretrained.rst |
Adds missing commas in code examples for valid Python syntax. |
Comments suppressed due to low confidence (1)
tiatoolbox/visualization/tileserver.py:644
- In
_add_annotation_overlay, theelsebranch callssq.dump(tmp_path)butsqis stillNonefor any suffix that isn't.geojson,.dat, or.db(e.g.,.tifappears in the overlay file list). This will raise anAttributeError. Restructure the logic sosqis always initialized before dumping (e.g., create/load a store for supported non-DB formats then dump to a temp.db, or raise a clear error for unsupported suffixes).
else:
# make a temporary db for the new annotations
tmp_path = Path(tempfile.gettempdir()) / f"temp_{session_id}.db"
sq.dump(tmp_path)
sq = SQLiteStore(tmp_path)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1046 +/- ##
===========================================
- Coverage 99.88% 99.88% -0.01%
===========================================
Files 85 85
Lines 11577 11576 -1
Branches 1513 1513
===========================================
- Hits 11564 11563 -1
Misses 6 6
Partials 7 7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your 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.
This PR updates documentation and improves code clarity across the project. It revises Python version references to reflect supported/testing versions, fixes typos and formatting issues, and enhances several docstrings. Minor code quality improvements include clearer error messages, corrected variable names, and removal of redundant statements. The NuClick post‑processing logic is updated for compatibility with newer scikit‑image behavior. No functional or API-breaking changes are introduced.