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

Include a .editorconfig file #24

Open
robvdl opened this issue Mar 31, 2023 · 3 comments
Open

Include a .editorconfig file #24

robvdl opened this issue Mar 31, 2023 · 3 comments

Comments

@robvdl
Copy link

robvdl commented Mar 31, 2023

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.

@Daniel15
Copy link

Daniel15 commented Apr 1, 2023

This is a good idea. Don't most editors auto-detect the indentation used in a file though?

@robvdl
Copy link
Author

robvdl commented Apr 1, 2023

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.

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

3 participants
@Daniel15 @robvdl and others