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

Update black #1379

Merged
merged 7 commits into from Apr 1, 2022
Merged

Update black #1379

merged 7 commits into from Apr 1, 2022

Conversation

antonpirker
Copy link
Member

.. and reformat code with new black.



def test_safe_repr_regressions():
# fmt: off
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that black does not remove the u"" from the strings and breaks our tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can "turn off" black formatting for parts of the code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no but why did you remove most of the other u""'s but not these ones?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strings containing only ascii characters do not need u"" in python 2.7. Only strings containing unicode chars need the u"". (hence "u")

I think Python (2) did a really bad job in adding unicode support to the language

@antonpirker antonpirker merged commit 9a82f7b into master Apr 1, 2022
@antonpirker antonpirker deleted the antonpirker/update-black branch April 1, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants