-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
Remove "bad characters" from our codebase #24841
Conversation
Turned out we had more "Bad characters" :P in our codebase than literally meets the eye :P |
4d1cdde
to
3f95cc9
Compare
:( Executable |
This is no go, I do not want to get ruby dependency for pre-commit. Time for 15-liner python script :) |
What's wrong with using smart/curly quotes in docs? |
For the context - this is the result of discussion in #24797 - where nbsps were shown in some IDES (only some IDES show it , some others will render it as space. The main reason is consistency. If we are using them inconsistently, then it's wrong. You either should use always curly quotes in your docs or always straight ones otherwise our docs will look strange if you look closely. Another problem it introduces it's "search & replace" functionality. Whenever you are using global search and replace and want to search for "quotes" you will often miss the curly quote cases - especially when it is "random" and not used consistently. Most of the "curly ones" comes usually (similarly as nbsp) from copy-pasting from word-like sources, but some people will use the "straight" ones, some people will use the "curly" ones and it's difficult to keep consistency. And the bad thing with it is also that sometimes those curly quotes will sneak-in the code examples and snippets which are part of our documentation and we will not notice. This happened often to me where I wanted to copy some piece of code from the browser, It did not parse/compile or produce strange results. Of course there are plenty exceptions where you realy can't use curly ones (code snippets etc.) and it's next to impossible to figure out automatically when yoiu can use them.. It's far easier to replace all curly ones with straight ones. The consistency of look&feel is kept and you avoid any of the problems above. And look & feel is marginally impacted IMHO.. And if we REALLY want to keep the curly quotes in some specific files, or folders we can always exclude them by regexp in pre-commit. |
We had plenty of "bad characters" in our codebase that were not invited and came here by accident. We want to get rid of those "bad characters" once and for all.
3f95cc9
to
3647f8b
Compare
Updated much improved version:
|
Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
We had plenty of "bad characters" in our codebase that were not
invited and came here by accident. We want to get rid of those
"bad characters" once and for all.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
, in newsfragments.