Remove the version checks around add_note() - #138
Open
eda-s-claude-bot[bot] wants to merge 1 commit into
Open
Conversation
…supported Python
'Exception.add_note()' was added in Python 3.11, and this package requires 3.11 or newer
(setup.py: pythonVersions=("3.11", "3.12", "3.13", "3.14")), so 'if version_info >= (3, 11):' is
always true. Four guards removed, together with the now unused 'from sys import version_info'.
The '# pragma: no cover' markers go with them - those lines were never covered, because the false
branch cannot be reached.
Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #138 +/- ##
==========================================
- Coverage 69.74% 1.76% -67.98%
==========================================
Files 3 1 -2
Lines 1160 1018 -142
Branches 199 176 -23
==========================================
- Hits 809 18 -791
- Misses 266 1000 +734
+ Partials 85 0 -85
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
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.
Bug Fixes
All 4
Exception.add_note()call was wrapped inif version_info >= (3, 11):, so the note was attached only onPython 3.11 and newer. This package requires Python 3.11 or newer
(
setup.py:pythonVersions=("3.11", "3.12", "3.13", "3.14")), so the condition is always true and the guard is aleftover from supporting 3.10.
The
# pragma: no covermarkers go with them: those lines were never covered because the false branch cannot bereached, and marking reachable code as uncoverable hides it from the coverage report.
Changes
from sys import version_infois dropped where nothing else used it.Unit Tests
DependencyScan.py::VHDL::test_VHDLLibrary(UnboundLocalError), failsthe same way on
dev.Related Issues and Pull-Requests
pyTooling(#277),pyEDAA.IPXACTandpyEDAA.Reports, following a review comment inpyTooling#274: "pyTooling is Python 3.11+, so no version check
is required."