the-algorithm-ml
the-algorithm-ml copied to clipboard
Include a .editorconfig file
Twitter's source code uses a slightly unusual code style, 2 space indentiation while the Python language preference is 4.
It would be nice if a .editorconfig file was included in each repo stating to use 2 space indention for .py files as that would help IDE's and editors use the correct indentation for the project.
This is a good idea. Don't most editors auto-detect the indentation used in a file though?
Yeah to a point but how would you detect 2 space vs 4 space? The .editorconfig format is widely used in existing projects out there (see editorconfig.org). Multilanguage projects are often more complex where you might have .js and .json using 2 space, but .py using 4 space, while other files (Go and Make just as an example) might use tabs. By including a .editorconfig file I don't really have to think so much about that.