[FIX] Cleanup ConfigSpace warnings#183
Conversation
Codecov Report
@@ Coverage Diff @@
## master #183 +/- ##
==========================================
+ Coverage 68.20% 68.22% +0.01%
==========================================
Files 18 18
Lines 1774 1775 +1
==========================================
+ Hits 1210 1211 +1
Misses 564 564
Continue to review full report at Codecov.
|
| pp_connective = pyparsing.Word("||" + "&&") | ||
| # A word matches each character as a set. So && is processed as & | ||
| # https://pythonhosted.org/pyparsing/pyparsing.Word-class.html | ||
| pp_connective = pyparsing.Word("|" + "&") |
There was a problem hiding this comment.
Shouldn't this be pyparsing.Literal then?
There was a problem hiding this comment.
Thanks for the catch of log. I have fixed that.
Leaving pp_connective = pyparsing.Word("|" + "&") as it is was intentional, as this line assumes you will be checking for & or | not &|.
I do not know much about pyparsing, but probably we can do some Combine or And to create this behaviour. In other words, if one just makes this literal this unit test fails.
Let me know how you want to proceed (that is re-writing the pyparsing statement or keeping the pyparsing.Word("|" + "&")).
There was a problem hiding this comment.
That makes sense. Can you check whether there's a union of literals we could use here to rewrite this statement to check for either "??" or "||"?
There was a problem hiding this comment.
I thought it was gonna be more complicated, sorry about that. Let me know if this change is ok!
There was a problem hiding this comment.
The change looks good. There's no need to keep this simple, this should be used only very rarely anyways, so it can be slow...
mfeurer
left a comment
There was a problem hiding this comment.
Looks good to me. Is this ready to be merged?
|
Yes, it is, thanks for taking a look. |
This PR aims to remove every warning from configspace (so we have a full green pytest run).
This is done by:
/home/chico/.local/lib/python3.8/site-packages/pyparsing.py:3190: FutureWarning: Possible set intersection at position 3