silence pylint warning about pika dep in tool #5380
Merged
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.
Every now and then, pylint gets upset about a
pika
import intools/direct_queue_publisher.py
. Here's a snippet from a GHA run in #5096 (NB: that PR does not touch any of these files, so fixing this in that PR doesn't make sense):https://github.com/StackStorm/st2/pull/5096/checks?check_run_id=3808812826#step:11:467
st2/tools/direct_queue_publisher.py
Line 21 in 8496bb2
I think it's weird that we're not consistently getting this error because pylint should be running on all the tools files:
st2/Makefile
Line 361 in f65f62f
This tool dates back to April 2016 (f6897d2) with this in the commit message:
Plus, from what I can tell, kombu doesn't offer a way to publish directly to a queue; it requires an exchange. So this tool has to use something other than kombu.
So, we can either delete this script or leave it around for possible future debugging. To leave it around, we should protect it such that pylint doesn't complain and anyone who tries to use it gets a helpful message about why it doesn't work. That's what I did in this PR.