Commit Graph

2 Commits

Author SHA1 Message Date
Campbell Barton
99fff90eab pyproject: remove settings that cause other uses of autopep8 to fail
While the ability to run `autopep8 .` to format Blender's Python code
is handy, the settings to perform this can conflict with other uses
of autopep8 (which editors may use to auto-format on save).

Some arguments now need to be passed in, e.g:

    autopep8 . --in-place --recursive --jobs=0

We'll likely include this in `make format` convenience target so the
details for invoking autopep8 shouldn't be an issue in the long term.
2022-04-24 13:41:02 +10:00
Campbell Barton
30acc5f9cd pyproject: add configuration for autopep8
This adds pyproject.toml, needed to configure defaults for autopep8.

The file is auto-discovered in a similar way to .clang-format, other
tools could be configured here too. For now just configure autopep8 so
this can be enabled in IDE's without causing unexpected edits such as
wrapping lines over 80 columns in width.

Now autopep8 can be used from the root directory by running: autopep8 .

This uses multiple-jobs to run autopep8 over all Python scripts except
paths that are explicitly ignored in exclude defined by pyproject.toml.

Reviewed By: mont29, brecht, sybren

Ref D14686
2022-04-22 10:13:39 +10:00