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

Tab vs. Space Policy #199

Closed
tbalke opened this issue Jan 31, 2022 · 5 comments · Fixed by #201
Closed

Tab vs. Space Policy #199

tbalke opened this issue Jan 31, 2022 · 5 comments · Fixed by #201
Labels
discussion required Some discussion necessary to decide how to address this issue standards Coding standards issues or violations

Comments

@tbalke
Copy link
Contributor

tbalke commented Jan 31, 2022

Do we have a policy for this?

We seem to be inconsistent. A search through the repo shows:

<space><space><space><space> found in 141 files
\tab found in 22 files

(Some false positives because of binary files)

@bwohlberg @Michael-T-McCann

@tbalke tbalke added standards Coding standards issues or violations discussion required Some discussion necessary to decide how to address this issue labels Jan 31, 2022
@Michael-T-McCann
Copy link
Contributor

Black solves this for us (that is, stops us from arguing over it). Spaces is what Black does, so spaces is what we do.

@bwohlberg
Copy link
Collaborator

According to PEP 8

Spaces are the preferred indentation method.

Tabs should be used solely to remain consistent with code that is already indented with tabs.

I don't think it's a big issue, but we could add a pre-commit hook to replace tabs with spaces.

@bwohlberg
Copy link
Collaborator

Black solves this for us (that is, stops us from arguing over it). Spaces is what Black does, so spaces is what we do.

I guess the tabs that @tbalke found must have sneaked in before we introduced the Black pre-commit hook.

@bwohlberg
Copy link
Collaborator

Correction: all the tabs are in the docs .rst files, which is obviously why Black didn't do the replacement.

@tbalke
Copy link
Contributor Author

tbalke commented Jan 31, 2022

Correction: all the tabs are in the docs .rst files, which is obviously why Black didn't do the replacement.

Really? See my comment in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion required Some discussion necessary to decide how to address this issue standards Coding standards issues or violations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants