Skip to content

Replace spaces with tabs and add to pre-commit linting#4601

Merged
radarhere merged 1 commit into
python-pillow:masterfrom
hugovk:keep-out-the-tabs
May 2, 2020
Merged

Replace spaces with tabs and add to pre-commit linting#4601
radarhere merged 1 commit into
python-pillow:masterfrom
hugovk:keep-out-the-tabs

Conversation

@hugovk

@hugovk hugovk commented May 1, 2020

Copy link
Copy Markdown
Member

Changes proposed in this pull request:

  • Replace spaces with tabs in non-C files
  • Check for tabs in linting

PR #4600 replaced the tabs with spaces in the .c and .h files. 🎉 Let's keep them out with a lint checker.

Now, there are some test images (like .eps) that contain valid tabs and also makefiles must use tabs.

We've a couple of options:

  • Only check certain file types (for example: .c .h .py .md .rst .txt ...?)
  • Check all but exclude certain file types (Makefile .bat .cmake .eps .fits .opt)

This PR does the latter to keep the net wider. It's possible it could find a valid tab in another file in the future, and we could adjust the exclusion list then. Or, as the exclude: is a regex, we could also exclude directories now.

But the former could be okay too, most invalid tabs would probably show up in a smaller set of file types that account for the most files. I don't have a strong preference.

@hugovk hugovk added the Testing label May 1, 2020
@radarhere
radarhere merged commit db009dd into python-pillow:master May 2, 2020
@hugovk
hugovk deleted the keep-out-the-tabs branch May 2, 2020 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants