Replaced NotImplementedError with NotImplemented#5544
Replaced NotImplementedError with NotImplemented#5544trexfeathers merged 3 commits intoSciTools:mainfrom
NotImplementedError with NotImplemented#5544Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5544 +/- ##
=======================================
Coverage 89.41% 89.41%
=======================================
Files 89 89
Lines 22539 22539
Branches 5387 5387
=======================================
Hits 20154 20154
Misses 1639 1639
Partials 746 746
☔ View full report in Codecov by Sentry. |
trexfeathers
left a comment
There was a problem hiding this comment.
Thanks for your diligence, @fazledyn-or!
trexfeathers
left a comment
There was a problem hiding this comment.
Almost forgot: please could you add a contribution to latest.rst? We love to celebrate contributions from the community.
iris/docs/src/whatsnew/latest.rst
Lines 83 to 103 in b1c91cc
9e9abbe to
38b2afb
Compare
38b2afb to
561526b
Compare
|
Sorry for the force push. I had committed some unwanted changes. Please look at the latest commit and suggest. Thanks |
|
Ooops, that failure is because we need your name in this section to get the link to work: iris/docs/src/whatsnew/latest.rst Lines 109 to 115 in 561526b |
* upstream/main: moved latest warning banner logic to conf.py (SciTools#5508) updated layout of top navbar (SciTools#5505) Oblique and Rotated Mercator (SciTools#5548) [pre-commit.ci] pre-commit autoupdate (SciTools#5549) [pre-commit.ci] pre-commit autoupdate (SciTools#5527) Bump scitools/workflows from 2023.09.1 to 2023.10.0 (SciTools#5540) nep29 drop table schedule numpy>1.21 (SciTools#5525) Updated environment lockfiles (SciTools#5545) Replaced `NotImplementedError` with `NotImplemented` (SciTools#5544) Gallery: show colour bar stealing space from multiple axes (SciTools#5537) Updated environment lockfiles (SciTools#5524) Set some memory benchmarks to on-demand to reduce noise. (SciTools#5481) updating docs and stale comment (SciTools#5522) Ensure removal of release candidate from What's New title. (SciTools#5526) Updated environment lockfiles (SciTools#5513) Docs page on filtering warnings (SciTools#5509) Replaced pkg_resources version parser with packager version parser. (SciTools#5511) Categorise warnings (SciTools#5498) Updated all np.product calls to np.prod (SciTools#5493)
This PR is made against #5521
🚀 Pull Request
Description
NotImplementedErrorwithNotImplementedMore Info
In file: coords.py, class: CellMethod, there is a special method add that raises a NotImplementedError. If a special method supporting a binary operation is not implemented it should return NotImplemented. On the other hand, NotImplementedError should be raised from abstract methods inside user defined base classes to indicate that derived classes should override those methods. iCR suggested that the special method add should return NotImplemented instead of raising an exception.
An example of how NotImplemented helps the interpreter support a binary operation is here.
CLA Requirements
This section is only relevant if your project requires contributors to sign a Contributor License Agreement (CLA) for external contributions.
All contributed commits are already automatically signed off.
Sponsorship and Support
This work is done by the security researchers from OpenRefactory and is supported by the Open Source Security Foundation (OpenSSF): Project Alpha-Omega. Alpha-Omega is a project partnering with open source software project maintainers to systematically find new, as-yet-undiscovered vulnerabilities in open source code - and get them fixed – to improve global software supply chain security.
The bug is found by running the Intelligent Code Repair (iCR) tool by OpenRefactory and then manually triaging the results.
Consult Iris pull request check list