Skip to content
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

KAFKA-15153: Use Python 'is' instead of '==' to compare for None #13964

Merged
merged 1 commit into from Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion release_notes.py
Expand Up @@ -44,7 +44,7 @@ def get_issues(jira, query, **kwargs):
results = []
startAt = 0
new_results = None
while new_results == None or len(new_results) == MAX_RESULTS:
while new_results is None or len(new_results) == MAX_RESULTS:
new_results = jira.search_issues(query, startAt=startAt, maxResults=MAX_RESULTS, **kwargs)
results += new_results
startAt += len(new_results)
Expand Down
2 changes: 1 addition & 1 deletion tests/kafkatest/tests/client/consumer_test.py
Expand Up @@ -334,7 +334,7 @@ def test_consumer_failure(self, clean_shutdown, enable_autocommit, metadata_quor

# stop the partition owner and await its shutdown
consumer.kill_node(partition_owner, clean_shutdown=clean_shutdown)
wait_until(lambda: len(consumer.joined_nodes()) == (self.num_consumers - 1) and consumer.owner(partition) != None,
wait_until(lambda: len(consumer.joined_nodes()) == (self.num_consumers - 1) and consumer.owner(partition) is not None,
timeout_sec=self.session_timeout_sec*2+5,
err_msg="Timed out waiting for consumer to close")

Expand Down
2 changes: 1 addition & 1 deletion tests/kafkatest/tests/connect/connect_test.py
Expand Up @@ -79,7 +79,7 @@ def test_file_source_and_sink(self, converter="org.apache.kafka.connect.json.Jso
parameterizations to test different converters (which also test per-connector converter overrides), schema/schemaless
modes, and security support.
"""
assert converter != None, "converter type must be set"
assert converter is not None, "converter type must be set"
# Template parameters. Note that we don't set key/value.converter. These default to JsonConverter and we validate
# converter overrides via the connector configuration.
if converter != "org.apache.kafka.connect.json.JsonConverter":
Expand Down