Skip to content
Snippets Groups Projects
Commit 3fcddd02 authored by Campbell Barton's avatar Campbell Barton
Browse files

pyproject: match settings from Blender's configuration

parent 50c27746
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,11 @@ ignore = [ ...@@ -20,6 +20,11 @@ ignore = [
# Why disable? Re-ordering imports is disruptive and breaks some scripts # Why disable? Re-ordering imports is disruptive and breaks some scripts
# that need to check if a module has already been loaded in the case of reloading. # that need to check if a module has already been loaded in the case of reloading.
"E402", "E402",
# Info: Try to make lines fit within --max-line-length characters.
# Why disable? Causes lines to be wrapped, where long lines have the trailing bracket moved to the end of the line.
# If trailing commas were respected as they are by clang-format this might be acceptable.
# Note that this doesn't disable all line wrapping.
"E501",
# Info: Fix various deprecated code (via lib2to3) # Info: Fix various deprecated code (via lib2to3)
# Why disable? Does nothing besides incorrectly adding a duplicate import, # Why disable? Does nothing besides incorrectly adding a duplicate import,
# could be reported as a bug except this is likely to be removed soon, see: # could be reported as a bug except this is likely to be removed soon, see:
...@@ -27,6 +32,10 @@ ignore = [ ...@@ -27,6 +32,10 @@ ignore = [
"W690", "W690",
] ]
# Use aggressive as many useful edits are disabled unless it's enabled.
# Any edits which are overly disruptive or risky can be removed in the `ignore` list.
aggressive = 2
# Exclude: # Exclude:
# - `./svn_rev_map/` contains data-files which are slow to re-format and don't benefit from formatting. # - `./svn_rev_map/` contains data-files which are slow to re-format and don't benefit from formatting.
exclude = """ exclude = """
...@@ -34,11 +43,5 @@ exclude = """ ...@@ -34,11 +43,5 @@ exclude = """
./svn_rev_map/rev_to_sha1.py, ./svn_rev_map/rev_to_sha1.py,
""" """
# Match CPU count. # Omit settings such as `jobs`, `in_place` & `recursive` as they can cause editor utilities that auto-format on save
jobs = 0 # to fail if the STDIN/STDOUT is used for formatting (which isn't compatible with these options).
# Format files in-place.
in_place = true
# Format directories recursively (except for excluded paths).
recursive = true
...@@ -63,6 +63,12 @@ def autopep8_format_file(f): ...@@ -63,6 +63,12 @@ def autopep8_format_file(f):
# Why disable?: re-ordering imports is disruptive and breaks some scripts # Why disable?: re-ordering imports is disruptive and breaks some scripts
# that need to check if a module has already been loaded in the case of reloading. # that need to check if a module has already been loaded in the case of reloading.
"E402", "E402",
# Info: Try to make lines fit within --max-line-length characters.
# Why disable? Causes lines to be wrapped, where long lines have the
# trailing bracket moved to the end of the line.
# If trailing commas were respected as they are by clang-format this might be acceptable.
# Note that this doesn't disable all line wrapping.
"E501",
# Info: Fix various deprecated code (via lib2to3) # Info: Fix various deprecated code (via lib2to3)
# Why disable?: causes imports to be added/re-arranged. # Why disable?: causes imports to be added/re-arranged.
"W690", "W690",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment