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

Consider supporting tabs #64

Open
grantjenks opened this issue Jan 31, 2022 · 8 comments
Open

Consider supporting tabs #64

grantjenks opened this issue Jan 31, 2022 · 8 comments

Comments

@grantjenks
Copy link
Owner

See “tan” at jleclanche/tan@e23c038

There seem to be some arguments around accessibility for supporting tabs.

@warsaw
Copy link
Collaborator

warsaw commented Jan 31, 2022

I personally agree with @ambv in that thread. Tabs are fundamentally problematic because no one can agree on whether they should equal 4 spaces or 8. Mixing tabs and spaces is an impossibility for this reason, but even supporting all tabs is a problem because source files will not be portable (your IDE says tab=4 spaces, mine says they = 8).

@KOLANICH
Copy link

KOLANICH commented Nov 3, 2022

Tabs are fundamentally problematic because no one can agree on whether they should equal 4 spaces or 8

Tabs take the amount of spaces configured in .editorconfig file.

@KOLANICH
Copy link

KOLANICH commented Nov 3, 2022

If an IDE/text editor doesn't support .editorconfig files aleady, it should be replaced. Every sensible IDE (Qt Creator, Kate, Notepad++, Sublime, Atom, VS Code, Visual Studio, NetBeans, IDEA, Eclypse, ...) already supports them for a long time (either itself, or via a plugin). If it doesn't, it is a non-sensible IDE.

@so-rose
Copy link

so-rose commented Dec 23, 2022

+1 for tabs! Would a PR be welcome?

@KOLANICH
Copy link

Barely a vanilla black, but with tabs: https://github.com/KOLANICH-tools/antiflash.py

Note: it currently has issue with tabs in multiline comments.

@so-rose
Copy link

so-rose commented Dec 23, 2022

@KOLANICH tan is relatively frequently updated. I figure it could be merged painlessly into blue. Maybe after a rebase.

Considering the philosophy of blue, maybe it's best to just suggest the PR (along with a good argument for it) and see what happens?

I like the idea of grouping all these sorts of black customizations into one effort; it kind of helps the case, support, etc. . blue is, for example, already nicely supported in the null-ls plugin feeding neovims LSP client, right alongside black.

@KOLANICH
Copy link

tan is relatively frequently updated.

3 months obsolete, 82 commits behind psf:main

I figure it could be merged painlessly into blue. Maybe after a rebase.

Wrong approach, as I have said. Most of tools based on black making it more compromising maintain own forks of it. My tool is not a fork, it is an AST-level monkey-patch, in some situations when there are conflicts in line-based tools like git, AST-level patches have no conflicts. It allows me to apply it automatically to black and not to touch its source code at all, while black is just updated. I don't have to update 2 tools, instead I just update only black. But thank you for the hint.

But there is a problem with black. It is terribly slow, even with uvloop. Though autopep8 is even slower.

@sciyoshi
Copy link

@KOLANICH FWIW we just updated tan against the latest release of black (22.12.0).

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

No branches or pull requests

5 participants