Commit Graph

5 Commits

Author SHA1 Message Date
luzpaz
4d982cbb5d Cleanup: fix various typos
Differential Revision: https://developer.blender.org/D15304
2022-06-28 15:56:16 +02:00
Campbell Barton
42d748be34 pyproject: re-enable line wrapping for autopep8
The problem noted in the configuration file no longer occurs,
re-enabling line wrapping (E501).
2022-05-13 18:05:07 +10:00
Campbell Barton
802bc8e233 pyproject: enable aggressive, ignore E501 (line wrapping)
Aggressive needs to be enabled for many useful edits to take effect,
the ignore list is currently used to disable edits that may need
further checks/investigation before they're enabled.

Note that aggressive was already enabled for the:
source/tools/utils/autopep8_clean.py script which was previously used
when applying autopep8.
2022-04-26 14:59:41 +10:00
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