-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Improper Method Call: Replaced NotImplementedError
#2071
Fixed Improper Method Call: Replaced NotImplementedError
#2071
Conversation
Signed-off-by: fazledyn-or <[email protected]>
NotImplementedError
with NotImplemented
NotImplementedError
To be checked if using return in place of exception does not have any side effect. |
I tested it with the following code, which obviously should fail as you cannot subtract "8" from a string. node[x][tag("a")-tag("b")="hello"] {
throwWarning: "x";
assertNoMatch: "node a=test b=8 x=abc";
} Compilation of the mapcss code works in either case (the minus is not evaluated during compiling) Running the code with
Running the code with
I don't have a clear favorite out of the two, but it indeed seems that Python advocates the node[x][tag("a")-number_of_tags()="hello"] {
throwWarning: "x";
assertNoMatch: "node a=test b=8 x=abc";
}
Seems to be correct based on the documentation (same for |
Ok thank you a lot for looking into this.
Probably forgotten here from the py2 -> py3 migration. I think the method could be removed. |
It looks like |
Correct, the question is mostly whether we want to remove it (since apparently it's never called) or rename it. I'm fine with it either way. I think you mean your preference is to rename it? |
In |
Signed-off-by: fazledyn-or <[email protected]>
Merged. Thank you. |
Details
While triaging your project, our bug fixing tool generated the following message(s)-
Related Documentation
Moreover, we noticed that a method called
__rdiv__
was defined in the same file. It is to be noted that this method belongs to Python 2.0 according to the documentation. The Python 3 equivalent of that method is__rtruediv__
. In that's the case and you're willing, I can rename the__rdiv__
method to__rtruediv__
.Changes
NotImplementedError
withNotImplemented
Previously Found & Fixed
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.