You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"json enter input={'a': 2} kwargs={\"strict\": None, \"context\": {\"c\": 2}}"
Black will reformat as:
'json enter input={\'a\': 2} kwargs={"strict": None, "context": {"c": 2}}'
Ruff does the same thing, so it's not a compatibility issue. But I'm wondering if it makes more sense to bias towards the preferred quote style if you need backslashes regardless (even if the non-preferred style results in fewer backslashes).
I'm leaning toward Black compatibility. It doesn't seem we have strong reasoning to diverge. E.g. for the above example, I find Black's formatting easier to read and it results in a shorter string overall.
"json enter input={'a': 2} kwargs={\"strict\": None, \"context\": {\"c\": 2}}"
It doesn't seem to have come up again. We can improve our documentation if this comes up more often. @charliermarsh feel free to re-open if you disagree with my decision.
Given:
"json enter input={'a': 2} kwargs={\"strict\": None, \"context\": {\"c\": 2}}"
Black will reformat as:
'json enter input={\'a\': 2} kwargs={"strict": None, "context": {"c": 2}}'
Ruff does the same thing, so it's not a compatibility issue. But I'm wondering if it makes more sense to bias towards the preferred quote style if you need backslashes regardless (even if the non-preferred style results in fewer backslashes).
This came up in the Pydantic migration: https://github.com/pydantic/pydantic/pull/7930/files#r1373829517
The text was updated successfully, but these errors were encountered: