Skip to content
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

Normalise "R" string prefix to lower case #2741

Open
felix-hilden opened this issue Jan 3, 2022 · 2 comments
Open

Normalise "R" string prefix to lower case #2741

felix-hilden opened this issue Jan 3, 2022 · 2 comments
Labels
F: strings Related to our handling of strings T: style What do we want Blackened code to look like?

Comments

@felix-hilden
Copy link
Collaborator

Describe the style change
I'd like to normalise raw strings with a capital R, like R"flowers" to lower case: r"flowers".

Additional context
Currently our reasoning for keeping "R" is that a syntax highlighter called MagicPython differentiates between the two. And because it is the default in GitHub and VS Code, we should be careful about changing it.

Currently though, I think Pygments is the standard syntax highlighter. I don't know much about MagicPython, but it hasn't been updated since 2020. 1.3k GH stars is a lot, yes, but all of these signs show to me that maybe we shouldn't make an exception here anymore.

@felix-hilden felix-hilden added T: style What do we want Blackened code to look like? F: strings Related to our handling of strings labels Jan 3, 2022
@felix-hilden
Copy link
Collaborator Author

Richard wrote on Discord, that VS Code still uses MagicPython. Doesn't bother me personally, but this isn't as trivial as I thought at first. Style-wise I still dislike the capital "R", and this would be a neat change to land with #2297.

@ichard26 ichard26 added R: rejected This will not be worked on and removed R: rejected This will not be worked on labels Feb 1, 2023
@ichard26
Copy link
Collaborator

ichard26 commented Feb 1, 2023

I was going to reject this suggestion... however, I did some digging and it looks like GitHub stopped using MagicPython as their syntax highlighter! Visual Studio Code still uses MagicPython and I still don't think it's worth changing this, but there is some room for debate.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: strings Related to our handling of strings T: style What do we want Blackened code to look like?
Projects
None yet
Development

No branches or pull requests

2 participants