-
Notifications
You must be signed in to change notification settings - Fork 32
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
bootstrap_servers argument usage #98
bootstrap_servers argument usage #98
Conversation
servers_field = f"'{self.bootstrap_servers}'" | ||
else: | ||
servers_field = str(self.bootstrap_servers)[1:-1] | ||
query += f" BOOTSTRAP_SERVERS {servers_field}" |
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.
Consider changing this if-else into one-liner
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.
can you help me understand how? Something like:
servers_field = f"'{self.bootstrap_servers}'" if isinstance(self.bootstrap_servers, str) else str(self.bootstrap_servers)[1:-1]
Seems too long
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.
Python is known for such long statements. But i stated "consider", not "rewrite"
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.
Minor updates
Build and Test fails because of pymgclient version 1.1.0 in pyproject.toml and poetry.lock, this is not an issue here as it is like this in develop branch |
Update the
bootstrap_servers
argument to accept unquoted values and lists of unquoted values.