-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Strip RIGHT-TO-LEFT OVERRIDE and LEFT-TO-RIGHT OVERRIDE characters from AUTHORS.txt #12517
Conversation
This is marked draft because it has no changelog entry -- I suppose it does not need one. Happy to receive feedback. |
…om AUTHORS.txt Since we don't know anything about the names, we assume anything in between RIGHT-TO-LEFT OVERRIDE and LEFT-TO-RIGHT OVERRIDE (or the end of the name) should be spelled backwards. This resulted in a duplicate author name, because it uses different Unicode form. So I also added a call to unicodedata.normalize. Fixes pypa#12467
cd91152
to
239c1d4
Compare
Feel welcome to mark this ready for review! |
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.
I'd say we can merge this PR now, unless I am missing something?
Possible improvement: It might be useful to put the conversion into the pre-commit config. For example, we have author sorting on that level and it's nice that it can be autofixed: https://github.com/aio-libs/aiohttp/blob/0e91eb0/.pre-commit-config.yaml#L79. |
+1 to having a pre-commit hook for this. |
I am a bit lost. A pre-commit hook to do what exactly? Instead of generating the AUTHORS file as we desire, we would generate it with the RTL OVERRIDE characters, and only then would we fix it by a pre-commit hook? How is that better? |
I thought this file is also modified externally. I didn't realize you're modifying the script that produces it in the first place. I suppose your solution is correct, then. |
Gonna merge and see what happens. |
Since we don't know anything about the names, we assume anything in between RIGHT-TO-LEFT OVERRIDE and LEFT-TO-RIGHT OVERRIDE (or the end of the name) should be spelled backwards.
This resulted in a duplicate author name,
because it uses different Unicode form.
So I also added a call to unicodedata.normalize.
Fixes #12467