Skip to content

Add indent-size option

username-removed-952140 requested to merge toogy/flake8:multi-indent into master

flake8 relying on pycodestyle for checking the coding style, the ability to have a custom indent size (number of spaces used for indentation) needs to be added there.

There's already a PR hanging on GitHub for that: https://github.com/PyCQA/pycodestyle/pull/524. It was not up-to-date so I took care of rebasing on the initial pycodestyle repository's master branch and submitted a PR to the initial forker: https://github.com/iamaspacecow/pycodestyle/pull/1.

This PR here adds an indent-size option to flake8 that uses the option added to pycodestyle by the initial PR.

It's getting a little bit complicated with all those forks and PRs but basically it works! All tests passing on both repositories (the initial PR added a test to verify that the indent-size setting was working correctly) and I empirically tested the new feature on my code base with various indent-size values.

Of course, builds won't be passing before the pycodestyle PR is merged.

Merge request reports