Cleanup: remove "<pep8 compliant>" from headers

It can be assumed that all scripts comply with basic pep8 formatting
regarding white-space, indentation etc.

Also remove note in best practices page & update `tests/python/pep8.py`.

If we want to exclude some scripts from make format,
this can be done by adding them to `ignore_files` in:
source/tools/utils_maintenance/autopep8_format_paths.py

Or using `# nopep8` for to ignore for individual lines.

Ref T98554
This commit is contained in:
2022-06-02 19:59:52 +10:00
parent 48bb144fea
commit 3ca76ae0e8
223 changed files with 2 additions and 470 deletions

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
__all__ = (
"paths",
"modules",

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
"""
This module has utility functions for renaming
rna values in fcurves and drivers.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
"""
Module to manage overriding various parts of Blender.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
# -----------------------------------------------------------------------------
# AppOverrideState

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
"""
Similar to ``addon_utils``, except we can only have one active at a time.

View File

@@ -2,6 +2,4 @@
# Copyright (c) 2009 www.stani.be
# <pep8 compliant>
"""Package for console specific modules."""

View File

@@ -2,8 +2,6 @@
# Copyright (c) 2009 www.stani.be
# <pep8-80 compliant>
import inspect
import re

View File

@@ -10,8 +10,6 @@
# the file COPYING, distributed as part of this software.
# ****************************************************************************
# <pep8 compliant>
"""Completer for import statements
Original code was from IPython/Extensions/ipy_completers.py. The following

View File

@@ -2,8 +2,6 @@
# Copyright (c) 2009 www.stani.be
# <pep8-80 compliant>
"""Autocomplete with the standard library"""
import re

View File

@@ -2,8 +2,6 @@
# Copyright (c) 2009 www.stani.be
# <pep8-80 compliant>
"""This module provides intellisense features such as:
* autocompletion

View File

@@ -1,5 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
"""Package for translation (i18n) tools."""

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Populate a template file (POT format currently) from Blender RNA/py/C data.
# XXX: This script is meant to be used from inside Blender!
# You should not directly use this script, rather use update_msg.py!

View File

@@ -1,8 +1,6 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Merge one or more .po files into the first dest one.
# If a msgkey is present in more than one merged po, the one in the first file wins, unless
# its marked as fuzzy and one later is not.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Global settings used by all scripts in this dir.
# XXX Before any use of the tools in this dir, please make a copy of this file
# named "setting.py"

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
import os
import settings

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Some misc utilities...
import collections

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Some useful operations from utils' I18nMessages class exposed as a CLI.
import os

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Update "languages" text file used by Blender at runtime to build translations menu.

View File

@@ -1,8 +1,6 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Pre-process right-to-left languages.
# You can use it either standalone, or through import_po_from_branches or
# update_trunk.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
import enchant
import os
import pickle

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
__all__ = (
"io",
"keymap_from_toolbar",

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# -----------------------------------------------------------------------------
# Export Functions

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Dynamically create a keymap which is used by the popup toolbar
# for accelerator key access.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
__all__ = (
"generate",
)

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Update Blender version this key-map was written in:
#
# When the version is `(0, 0, 0)`, the key-map being loaded didn't contain any versioning information.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Populate a template file (POT format currently) from Blender RNA/py/C data.
# Note: This script is meant to be used from inside Blender!

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
__all__ = (
"property_definition_from_data_path",
"decompose_data_path",

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
def url_prefill_from_blender(*, addon_info=None):
import bpy

View File

@@ -1,8 +1,6 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# This module can get render info without running from inside blender.
#
# This struct won't change according to Ton.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
"""
Give access to blender data and utility functions.
"""

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
# for slightly faster access
from _bpy import ops as _ops_module

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
"""
This module has a similar scope to os.path, containing utility
functions for dealing with paths in Blender.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
"""
This module contains utility functions specific to blender but
not associated with blenders internal data.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
"""
This module contains utility functions to handle custom previews.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# Until we untangle ToolDef from bl_ui internals,
# use this module to document ToolDef.
from bl_ui.space_toolsystem_common import ToolDef

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
"""
Utility modules associated with the bpy module.
"""

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
__all__ = (
"bake_action",
"bake_action_objects",

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
"""
Helpers for asset management tasks.
"""

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
from typing import Dict, Set
import bpy
from bpy.types import ID

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
__all__ = (
"load_image",
)

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
__all__ = (
"ExportHelper",
"ImportHelper",

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# -----------------------------------------------------------------------------
# Add-on helpers to properly (un)register their own keymaps.

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
__all__ = (
"mesh_linked_uv_islands",
"mesh_linked_triangles",

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
from mathutils import Color, Vector
__all__ = (

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
__all__ = (
"find_node_input",
)

View File

@@ -1,6 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
from __future__ import annotations
__all__ = (

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
__all__ = (
"region_2d_to_vector_3d",
"region_2d_to_origin_3d",

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
import time

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
"""
This module contains RestrictBlend context manager.
"""

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
from _bpy import types as bpy_types
StructRNA = bpy_types.bpy_struct

View File

@@ -1,6 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
import sys
import bpy

View File

@@ -1,6 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
import os
import bpy

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
import bpy
header = '''

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8-80 compliant>
# This file defines a set of methods that are useful for various
# Relative Keying Set (RKS) related operations, such as: callbacks
# for polling, iterator callbacks, and also generate callbacks.

View File

@@ -1,6 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
import bpy

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# classes for extracting info from blenders internal classes
import bpy

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
__all__ = (
"draw_entry",
"draw_km",

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
import bpy
from mathutils import Vector

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
import bpy

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# <pep8 compliant>
# classes for extracting info from blenders internal classes