Skip to content

Conversation

@antonpirker
Copy link
Contributor

.. 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
Contributor 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
Contributor 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
Contributor 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.

3 participants