1 # SPDX-License-Identifier: GPL-2.0-or-later
4 # Configuratuion for `autopep8`, allowing the command: autopep8 .
5 # to reformat all source files.
7 # NOTE: the settings defined here map directly to commmand line arguments
8 # which will override these settings when passed in to autopep8.
13 # Info: Use `isinstance()` instead of comparing types directly.
14 # Why disable? Changes code logic, in rare cases we want to compare exact types.
16 # Info: Fix bare except.
17 # Why disable? Disruptive, leave our exceptions alone.
19 # Info: Fix module level import not at top of file.
20 # Why disable? Re-ordering imports is disruptive and breaks some scripts
21 # that need to check if a module has already been loaded in the case of reloading.
23 # Info: Try to make lines fit within --max-line-length characters.
24 # Why disable? Causes lines to be wrapped, where long lines have the trailing bracket moved to the end of the line.
25 # If trailing commas were respected as they are by clang-format this might be acceptable.
26 # Note that this doesn't disable all line wrapping.
28 # Info: Fix various deprecated code (via lib2to3)
29 # Why disable? Does nothing besides incorrectly adding a duplicate import,
30 # could be reported as a bug except this is likely to be removed soon, see:
31 # https://github.com/python/cpython/issues/84540.
35 # Use aggressive as many useful edits are disabled unless it's enabled.
36 # Any edits which are overly disruptive or risky can be removed in the `ignore` list.
40 # - `./svn_rev_map/` contains data-files which are slow to re-format and don't benefit from formatting.
42 ./svn_rev_map/sha1_to_rev.py,
43 ./svn_rev_map/rev_to_sha1.py,
46 # Omit settings such as `jobs`, `in_place` & `recursive` as they can cause editor utilities that auto-format on save
47 # to fail if the STDIN/STDOUT is used for formatting (which isn't compatible with these options).