blender/pyproject.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
2.3 KiB
TOML
Raw Normal View History

# SPDX-License-Identifier: GPL-2.0-or-later
[tool.autopep8]
# Configuration for `autopep8`, allowing the command: autopep8 .
# to reformat all source files.
#
# NOTE: the settings defined here map directly to command line arguments
# which will override these settings when passed in to autopep8.
max_line_length = 120
ignore = [
# Info: Use `isinstance()` instead of comparing types directly.
# Why disable? Changes code logic, in rare cases we want to compare exact types.
"E721",
# Info: Fix bare except.
# Why disable? Disruptive, leave our exceptions alone.
"E722",
# Info: Fix module level import not at top of file.
# 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.
"E402",
# Info: Fix various deprecated code (via lib2to3)
# 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:
# https://github.com/python/cpython/issues/84540.
"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:
# - `./extern/` because it's maintained separately.
# - `./tools/svn_rev_map/` contains data-files which are slow to re-format and don't benefit from formatting.
# - `./scripts/addons*` because it is an external repository.
# which can contain their own configuration and be handled separately.
# - `./scripts/modules/rna_manual_reference.py` because it's a generated data-file.
exclude = """
./extern/*,
Extensions: Support online extensions and move add-ons outside Blender The extensions system allows to extend Blender with connectivity to the internet. Right now it means Blender can discover and install add-ons and themes directly from the internet, and notify users about their updates. By default this is disabled (opt-in), and users can enable it the first time they try to install an extension or visit the Prefences > Extensions tab. If this is enabled, Blender will automatically check for updates for extensions.blender.org upon startup. When will Blender access the remote repositories: * Every time you open the Preferences → Extensions: ALL the enabled repositories get checked for the latest info (json) * Every time you try to install by dragging: ALL the enabled repositories get checked for the latest info (json). * Every time you start Blender: selected repositories get checked for the latest info (json). ------------------ From the Blender code point of view, this means that most of the add-ons and themes originally bundled with Blender will now be available from the online platform, instead of bundled with Blender. The exception are add-ons which are deemed core functionality which just happened to be written as Python add-ons. Links: * Original Extenesions Platform Announcement: https://code.blender.org/2022/10/blender-extensions-platform/ * Extensions website: https://extensions.blender.org/ * User Manual: https://docs.blender.org/manual/en/4.2/extensions/index.html#extensions-index * Technical specifications: https://developer.blender.org/docs/features/extensions/ * Changes on add-ons bundling: https://devtalk.blender.org/t/changes-to-add-on-bundling-4-2-onwards/34593 ------------------ This PR does the following: * Move extensions out of experimental. * No longer install `scripts/addons` & `scripts/addons_contrib`. * Add `scripts/addons_core` to blender's repository. These add-ons will still be bundled with Blender and will be always enabled in the future, with their preferences moved to be more closely integrated with the rest of Blender. This will happen during the remaining bcon2 period. For more details, see #121830 From scripts/addons: * copy_global_transform.py * hydra_storm * io_anim_bvh * io_curve_svg * io_mesh_uv_layout * io_scene_fbx * io_scene_gltf2 * pose_library * ui_translate * viewport_vr_preview Extra: bl_pkg (scripts/addons_contrib) Note: The STL (legacy) add-on is going to be moved to the extensions platform. There is already a C++ version on core which is enabled by default. All the other add-ons are already available at extensions.blender.org. To use them you need to: * Go to User Preferences > Extensions * You will be greated with an "Online Extensions" message, click on "Enable Repository". * Search the add-on you are looking for (e.g, Import Images as Planes). * Click on Install Over time their maintaince will be transferred over to the community so their development can carry on. If you used to help maintain a bundled add-on please read: https://devtalk.blender.org/t/changes-to-add-on-bundling-4-2-onwards/34593 Ref: !121825
2024-05-15 12:21:00 +00:00
./scripts/addons_core/*,
./scripts/modules/rna_manual_reference.py,
./tools/svn_rev_map/sha1_to_rev.py,
./tools/svn_rev_map/rev_to_sha1.py,
"""
# Omit settings such as `jobs`, `in_place` & `recursive` as they can cause editor utilities that auto-format on save
# to fail if the STDIN/STDOUT is used for formatting (which isn't compatible with these options).
# Black shouldn't be used as a formatter. But if it's accidentally
# used, it certainly shouldn't change all the quote marks around
# strings. This simply makes such a mistake easier to recover from.
[tool.black]
skip-string-normalization = true
line-length = 120