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
Missing indentation in special combination of long names in a output collection in tuple
Hello! I may have found an issue with the formatting, where it does behave differently only in special cases.
After an automatic line break following the opening parenthesis of a function call, an indentation of 4 spaces is expected.
I tried this in several simplified versions (shorter names), where it worked as expected, but in the given example, the indentation does not occur.
I tested with the latest pip version of Black in Python 3.10, in the online formatter in the browser and with an editable install of the latest source code cloned from github [main] on Python 3.11.9.
Thank you for your quick response. I see how this can be expected behaviour in a technical sense that one indent is added. I am not too deeply involved in these topics, but we work with Black in all our projects at my company, so I am used to the style, but this case just felt and feels very unnatural, as the function name starts at the same vertical line with its parameters.
Experimenting around, I noticed that this happens with short variable names too, if I use a trailing comma, but not if I avoid it, as in:
Missing indentation in special combination of long names in a output collection in tuple
Hello! I may have found an issue with the formatting, where it does behave differently only in special cases.
After an automatic line break following the opening parenthesis of a function call, an indentation of 4 spaces is expected.
I tried this in several simplified versions (shorter names), where it worked as expected, but in the given example, the indentation does not occur.
I tested with the latest pip version of Black in Python 3.10, in the online formatter in the browser and with an editable install of the latest source code cloned from github [main] on Python 3.11.9.
And run it with these arguments:
Tested with parameter target versions python 3.9 - 3.12.
Python executables used: versions 3.10 and Python 3.11.9.
The resulting error is:
Runs without error, but does not output the expected format.
Expected behavior
Environment
Hope this helps and that I have not missed any limiting rules for the allowed length of variable names.
Thank you for all your appreciated work and efforts!
The text was updated successfully, but these errors were encountered: