Skip to content

Commit

Permalink
chore: fix A005
Browse files Browse the repository at this point in the history
  • Loading branch information
saturday06 committed Jan 9, 2025
1 parent b77a827 commit 0676a43
Show file tree
Hide file tree
Showing 44 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion src/io_scene_vrm/common/deep.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from . import convert
from .convert import Json
from .logging import get_logger
from .logger import get_logger

logger = get_logger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from bpy.types import Armature, Object

from ..logging import get_logger
from ..logger import get_logger
from ..vrm1.human_bone import HumanBoneSpecification
from . import (
cats_blender_plugin_fix_model_mapping,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/common/human_bone_mapper/mmd_mapping.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT OR GPL-3.0-or-later
from bpy.types import Object

from ..logging import get_logger
from ..logger import get_logger
from ..vrm1.human_bone import HumanBoneSpecification, HumanBoneSpecifications

logger = get_logger(__name__)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT OR GPL-3.0-or-later
import logging as standard_logging
import logging
import sys
from collections.abc import Mapping
from os import environ
Expand All @@ -10,9 +10,9 @@

# https://github.com/python/typeshed/issues/7855
if TYPE_CHECKING or sys.version_info >= (3, 11):
LoggerAdapter = standard_logging.LoggerAdapter[standard_logging.Logger]
LoggerAdapter = logging.LoggerAdapter[logging.Logger]
else:
LoggerAdapter = standard_logging.LoggerAdapter
LoggerAdapter = logging.LoggerAdapter


class VrmAddonLoggerAdapter(LoggerAdapter):
Expand All @@ -36,7 +36,7 @@ def log(
**kwargs: object,
) -> None:
# https://github.com/saturday06/VRM-Addon-for-Blender/blob/2_20_36/src/io_scene_vrm/__init__.py#L132-L134
level_name = standard_logging.getLevelName(level)
level_name = logging.getLevelName(level)
super().log(
level,
f"[VRM Add-on:{level_name}] {msg}",
Expand All @@ -51,9 +51,9 @@ def log(

# https://docs.python.org/3.7/library/logging.html#logging.getLogger
def get_logger(name: str) -> LoggerAdapter:
logger = standard_logging.getLogger(name)
logger = logging.getLogger(name)
if bpy.app.debug or environ.get("BLENDER_VRM_LOGGING_LEVEL_DEBUG") == "yes":
logger.setLevel(min(standard_logging.DEBUG, logger.getEffectiveLevel()))
logger.setLevel(min(logging.DEBUG, logger.getEffectiveLevel()))
else:
logger.setLevel(max(standard_logging.INFO, logger.getEffectiveLevel()))
logger.setLevel(max(logging.INFO, logger.getEffectiveLevel()))
return VrmAddonLoggerAdapter(logger, {})
2 changes: 1 addition & 1 deletion src/io_scene_vrm/common/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from bpy.types import AddonPreferences, Context, Operator, UILayout

from . import version
from .logging import get_logger
from .logger import get_logger

logger = get_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/common/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from bpy.types import Context

from .logging import get_logger
from .logger import get_logger

logger = get_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/common/rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
)
from mathutils import Quaternion

from .logging import get_logger
from .logger import get_logger

logger = get_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/common/shader.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
from . import convert
from .char import INTERNAL_NAME_PREFIX
from .gl import GL_CLAMP_TO_EDGE, GL_LINEAR, GL_NEAREST, GL_REPEAT
from .logging import get_logger
from .logger import get_logger
from .version import get_addon_version
from .workspace import save_workspace, wm_append_without_library

Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/common/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from bpy.app.translations import pgettext

from .blender_manifest import BlenderManifest
from .logging import get_logger
from .logger import get_logger

logger = get_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
)
from mathutils import Matrix, Quaternion

from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.preferences import VrmAddonPreferences
from .mtoon1.property_group import Mtoon1MaterialPropertyGroup
from .node_constraint1.property_group import NodeConstraint1NodeConstraintPropertyGroup
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from bpy.types import Armature, Context

from ..common import ops
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.preferences import get_preferences
from ..common.version import get_addon_version
from .extension import (
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/mtoon1/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from bpy.app.handlers import persistent
from bpy.types import Mesh

from ...common.logging import get_logger
from ...common.logger import get_logger
from ..extension import get_material_extension
from . import migration
from .ops import VRM_OT_refresh_mtoon1_outline
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/mtoon1/migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from ...common import convert, ops, shader, version
from ...common.gl import GL_LINEAR, GL_NEAREST
from ...common.logging import get_logger
from ...common.logger import get_logger
from ...common.progress import create_progress
from .. import search
from ..extension import get_material_extension
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/mtoon1/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from bpy_extras.node_shader_utils import PrincipledBSDFWrapper

from ...common import convert, shader
from ...common.logging import get_logger
from ...common.logger import get_logger
from ...common.preferences import get_preferences
from .. import search
from ..extension import get_material_extension
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/mtoon1/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from bpy.app.translations import pgettext
from bpy.types import Context, Panel, PropertyGroup, UILayout

from ...common.logging import get_logger
from ...common.logger import get_logger
from .. import search
from ..extension import get_material_extension
from ..ops import VRM_OT_open_url_in_web_browser, layout_operator
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/mtoon1/property_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
GL_NEAREST_MIPMAP_NEAREST,
GL_REPEAT,
)
from ...common.logging import get_logger
from ...common.logger import get_logger
from ...common.preferences import VrmAddonPreferences
from ...common.version import get_addon_version
from ..property_group import property_group_enum
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/property_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from bpy.props import FloatProperty, PointerProperty, StringProperty
from bpy.types import Armature, Bone, Material, Object, PropertyGroup

from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.vrm0 import human_bone as vrm0_human_bone
from ..common.vrm1 import human_bone as vrm1_human_bone

Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
ShaderNodeOutputMaterial,
)

from ..common.logging import get_logger
from ..common.logger import get_logger
from .extension import get_armature_extension

logger = get_logger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/spring_bone1/property_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from mathutils import Matrix, Quaternion, Vector

from ...common import convert
from ...common.logging import get_logger
from ...common.logger import get_logger
from ...common.rotation import (
get_rotation_as_quaternion,
set_rotation_without_mode_change,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/spring_bone1/ui_list.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT OR GPL-3.0-or-later
from bpy.types import Context, UILayout, UIList

from ...common.logging import get_logger
from ...common.logger import get_logger
from ..extension import get_armature_extension
from .property_group import (
SpringBone1ColliderGroupPropertyGroup,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import bpy
from bpy.types import Armature, Bone, Object

from ..common.logging import get_logger
from ..common.logger import get_logger
from .migration import (
on_change_bpy_armature_name,
on_change_bpy_bone_name,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/t_pose.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from mathutils import Euler, Matrix, Quaternion, Vector

from ..common import ops
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.rotation import (
get_rotation_as_quaternion,
set_rotation_without_mode_change,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from ..common import shader, version
from ..common.legacy_gltf import RGBA_INPUT_NAMES, TEXTURE_INPUT_NAMES, VAL_INPUT_NAMES
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.mtoon_unversioned import MtoonUnversioned
from ..common.preferences import get_preferences
from ..common.vrm0 import human_bone as vrm0_human_bone
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/vrm0/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import bpy
from bpy.app.handlers import persistent

from ...common.logging import get_logger
from ...common.logger import get_logger
from .property_group import Vrm0BlendShapeGroupPropertyGroup

logger = get_logger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/vrm0/property_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
)
from mathutils import Vector

from ...common.logging import get_logger
from ...common.logger import get_logger
from ...common.vrm0.human_bone import (
HumanBoneName,
HumanBoneSpecification,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/vrm1/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from bpy.app.handlers import persistent
from mathutils import Vector

from ...common.logging import get_logger
from ...common.logger import get_logger
from ..extension import get_armature_extension
from .property_group import Vrm1ExpressionPropertyGroup, Vrm1LookAtPropertyGroup

Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/vrm1/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

from ...common import ops, shader
from ...common.human_bone_mapper.human_bone_mapper import create_human_bone_mapping
from ...common.logging import get_logger
from ...common.logger import get_logger
from ...common.vrm0.human_bone import HumanBoneName as Vrm0HumanBoneName
from ...common.vrm1.human_bone import HumanBoneName, HumanBoneSpecifications
from ..extension import get_armature_extension
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/vrm1/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from bpy.app.translations import pgettext
from bpy.types import Armature, Context, Mesh, Object, Panel, UILayout

from ...common.logging import get_logger
from ...common.logger import get_logger
from ...common.vrm1.human_bone import HumanBoneSpecifications
from .. import ops, search
from ..extension import get_armature_extension, get_bone_extension
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/vrm1/property_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from mathutils import Matrix, Quaternion, Vector

from ...common.char import DISABLE_TRANSLATION
from ...common.logging import get_logger
from ...common.logger import get_logger
from ...common.rotation import set_rotation_without_mode_change
from ...common.vrm1.human_bone import (
HumanBoneName,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/editor/vrm1/ui_list.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT OR GPL-3.0-or-later
from bpy.types import Context, Mesh, UILayout, UIList

from ...common.logging import get_logger
from ...common.logger import get_logger
from ..property_group import StringPropertyGroup
from .property_group import (
Vrm1ExpressionsPropertyGroup,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/exporter/abstract_base_vrm_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ..common import shader
from ..common.convert import Json
from ..common.deep import make_json
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..editor.extension import get_armature_extension, get_material_extension
from ..editor.search import MESH_CONVERTIBLE_OBJECT_TYPES
from ..external import io_scene_gltf2_support
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/exporter/export_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from bpy_extras.io_utils import ExportHelper

from ..common import ops, version
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.preferences import (
ExportPreferencesProtocol,
copy_export_preferences,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/exporter/vrm0_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
FLOAT_POSITIVE_MAX,
)
from ..common.legacy_gltf import TEXTURE_INPUT_NAMES
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.mtoon_unversioned import MtoonUnversioned
from ..common.progress import Progress, create_progress
from ..common.version import get_addon_version
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/exporter/vrm1_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from ..common.convert import Json
from ..common.deep import make_json
from ..common.gltf import pack_glb, parse_glb
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.rotation import (
ROTATION_MODE_EULER,
get_rotation_as_quaternion,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/exporter/vrm_animation_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ..common.deep import make_json
from ..common.gl import GL_FLOAT
from ..common.gltf import pack_glb
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.rotation import (
ROTATION_MODE_AXIS_ANGLE,
ROTATION_MODE_EULER,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/external/io_scene_gltf2_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import bpy
from bpy.types import Context, Event, Image, Operator

from ..common.logging import get_logger
from ..common.logger import get_logger

#
# `import io_scene_gltf2` is executed in a function, not here. Importing it in the
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/importer/abstract_base_vrm_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)
from ..common.gl import GL_FLOAT, GL_LINEAR, GL_REPEAT, GL_UNSIGNED_SHORT
from ..common.gltf import FLOAT_NEGATIVE_MAX, FLOAT_POSITIVE_MAX, pack_glb, parse_glb
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.preferences import ImportPreferencesProtocol
from ..common.progress import PartialProgress, create_progress
from ..common.rotation import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from bpy.types import Image

from ..common.convert import sequence_or_none
from ..common.logging import get_logger
from ..common.logger import get_logger

logger = get_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/importer/import_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from bpy_extras.io_utils import ImportHelper

from ..common import ops, version
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.preferences import (
ImportPreferencesProtocol,
copy_import_preferences,
Expand Down
2 changes: 1 addition & 1 deletion src/io_scene_vrm/importer/vrm0_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from ..common import convert, shader
from ..common.convert import Json
from ..common.logging import get_logger
from ..common.logger import get_logger
from ..common.preferences import get_preferences
from ..common.progress import PartialProgress
from ..common.version import get_addon_version
Expand Down
Loading

0 comments on commit 0676a43

Please sign in to comment.