-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Indentation is incorrectly changed for tabulated comments after a dedent #262
Comments
Probably related. Here is another example: In [1]: import black
In [2]: black.__version__
Out[2]: '18.6b2'
In [3]: cat test_if.py
if True:
print("A1")
# print("A2")
else:
print("B1")
# print("B2")
In [4]: cat test_if_black.py
if True:
print("A1")
# print("A2")
else:
print("B1")
# print("B2")
|
@ambv I've opened a PR (#595) that fixes this issue and includes a minimal reproduction as a test case. Thanks again for this project! As an aside, I would implore you to please re-consider adding support for tabs - this feature is the one thing that is blocking our team from using Black. (In the meantime, we will be using @jleclanche's fork.) |
Operating system: Ubuntu 18.04
Python version: 3.6.3
Black version: master
Thank you @ambv for this library. When trying to run this on a codebase that uses tabs, indentation for comments past depth 0 is changed incorrectly after a dedent. Sample input (NB tabs):
Black reformats this to:
Note that this only happens when the input file uses tabs.
The text was updated successfully, but these errors were encountered: