-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update group_id syntax #63
Conversation
tom_fink/alertstream.py
Outdated
@@ -88,7 +88,7 @@ def listen(self): | |||
while poll_number < int(self.max_poll_number): | |||
try: | |||
logger.info( | |||
"FinkAlertStream.listen opening stream: {} with group_id: {} (call number: {})".format( | |||
"FinkAlertStream.listen opening stream: {} with group.id: {} (call number: {})".format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Julien, thanks for keeping tom_fink up-to-date. How about using an f-string here?
logger.info(f"FinkAlertStream.listen opening stream {self.url} with group.id {self.group_id} (call number: {poll_number})")
or this also works if the line gets too long:
logger.info(f"FinkAlertStream.listen opening stream {self.url}"
f" with group.id {self.group_id} (call number: {poll_number})")
If you like that syntax, there are other opportunities to convert from "".format()
to f-string syntax around lines 138-143 and 156-158.
Thanks again!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @phycodurus for the review -- I converted to f-string when it was simple enough -- but I prefer keeping the .format
syntax when it involves dictionaries (clearer to my opinion).
@phycodurus I'll let you merge (I'm no more authorized to do it?) |
Hi @JulienPeloton! If you are still having issues, let me know and I'll put it back how it was before. |
Thank you @jchate6 -- the current setup is perfect! |
Closes #62
This PR updates the syntax for the
group.id
parameter for Kafka in fink-client. I also updated the required version of fink-client & minimum version of Python.