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 [email protected] ❌ - Missing the "A"
- Apoorv Mittal [email protected] ✅ - 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]