You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "apoorvmittal10 (via GitHub)" <gi...@apache.org> on 2026/06/02 09:35:57 UTC
[PR] Minor: Correcting reviewers script for names [kafka]
apoorvmittal10 opened a new pull request, #22449:
URL: https://github.com/apache/kafka/pull/22449
The reviewers.py script incorrectly parses reviewer names that start with characters appearing in "Author:" or "Reviewers:", leading to truncated names.
### Issue
stripped = line.strip().lstrip("Reviewers: ").lstrip("Author: ")
The Problem: lstrip(string) does not remove a prefix string. Instead, it removes any characters from that character set from the left side of the string.
### Fix
Replace the buggy lstrip() calls with proper prefix removal. Two options available:
Option 1: Using removeprefix() (Python 3.9+)
```
stripped = line.strip().removeprefix("Reviewers: ").removeprefix("Author: ")
```
Requires Python 3.9+
Option 2: Using startswith() (Python 3.0+)
Used option 2 as the script currently supports Python 3+
Example Issue:
When searching for "Apoorv", the script showed:
- poorv Mittal apoorvmittal10@gmail.com ❌ - Missing the "A"
- Apoorv Mittal apoorvmittal10@gmail.com ✅ - Correct
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Correcting reviewers script for names [kafka]
Posted by "apoorvmittal10 (via GitHub)" <gi...@apache.org>.
apoorvmittal10 commented on PR #22449:
URL: https://github.com/apache/kafka/pull/22449#issuecomment-4611832762
> LGTM Since 3.8 is EOL now, `removeprefix()` (Option 1) is safe and a bit cleaner — but either works for me!
I didn't do that to not break if someone is still on old. Can do that with right comments in future. Thanks for the feedback.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Correcting reviewers script for names [kafka]
Posted by "apoorvmittal10 (via GitHub)" <gi...@apache.org>.
apoorvmittal10 merged PR #22449:
URL: https://github.com/apache/kafka/pull/22449
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org