Skip to content

Conversation

@CagriYonca
Copy link
Contributor

  • Close the consumer span when the poll request returns None.
  • Improve the consumer_token and consumer_span access.

@CagriYonca CagriYonca added this to the H1-2026 milestone Jan 12, 2026
@CagriYonca CagriYonca self-assigned this Jan 12, 2026
@CagriYonca CagriYonca added the bug label Jan 12, 2026
@CagriYonca CagriYonca requested a review from a team as a code owner January 12, 2026 11:25
context.detach(consumer_token)
consumer_token = None
token = consumer_token.get(None)
if token is not None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if token is not None:
if token:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8 document refers using is not None for checking None conditions:

@sonarqubecloud
Copy link

create_span("poll", res.topic(), res.headers())
else:
span = consumer_span.get(None)
if span is not None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if span is not None:
if span:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8 document refers using is not None for checking None conditions:

@CagriYonca CagriYonca requested a review from GSVarsha January 12, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants