Git Product home page Git Product logo

Comments (8)

warsaw avatar warsaw commented on August 18, 2024 1

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

from blue.

sciyoshi avatar sciyoshi commented on August 18, 2024 1

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

from blue.

KOLANICH avatar KOLANICH commented on August 18, 2024

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.

from blue.

KOLANICH avatar KOLANICH commented on August 18, 2024

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.

from blue.

so-rose avatar so-rose commented on August 18, 2024

+1 for tabs! Would a PR be welcome?

from blue.

KOLANICH avatar KOLANICH commented on August 18, 2024

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

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

from blue.

so-rose avatar so-rose commented on August 18, 2024

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

from blue.

KOLANICH avatar KOLANICH commented on August 18, 2024

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.

from blue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.