π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
refactor: resolve and enforce Ruff PGH004 (#5438)
huxiaoyi-ovo46f97ef1a7dd
diff --git a/kornia/models/common.py b/kornia/models/common.pyindex 5e58d77a3..2e4f58027 100644--- a/kornia/models/common.py+++ b/kornia/models/common.py@@ -142,7 +142,7 @@ class DropPath(nn.Module):# From https://github.com/facebookresearch/detectron2/blob/main/detectron2/layers/batch_norm.py-# Itself from https://github.com/facebookresearch/ConvNeXt/blob/d1fa8f6fef0a165b27399986cc2bdacc92777e40/models/convnext.py#L119 # noqa+# Itself from https://github.com/facebookresearch/ConvNeXt/blob/d1fa8f6fef0a165b27399986cc2bdacc92777e40/models/convnext.py#L119 # noqa: E501class LayerNorm2d(nn.Module):"""Apply Layer Normalization over a 4D input tensor (NCHW)."""diff --git a/kornia/models/sam/architecture/image_encoder.py b/kornia/models/sam/architecture/image_encoder.pyindex 695a80d79..1378e8424 100644--- a/kornia/models/sam/architecture/image_encoder.py+++ b/kornia/models/sam/architecture/image_encoder.py@@ -33,7 +33,7 @@ from kornia.models.common import LayerNorm2d, window_partition, window_unpartitifrom kornia.models.sam.architecture.common import MLPBlock-# This class and its supporting functions below lightly adapted from the ViTDet backbone available at: https://github.com/facebookresearch/detectron2/blob/main/detectron2/modeling/backbone/vit.py # noqa+# This class and its supporting functions below lightly adapted from the ViTDet backbone available at: https://github.com/facebookresearch/detectron2/blob/main/detectron2/modeling/backbone/vit.py # noqa: E501class ImageEncoderViT(nn.Module):"""Implement the Vision Transformer (ViT) based image encoder for SAM.diff --git a/kornia/models/yunet/model.py b/kornia/models/yunet/model.pyindex aef7d5bf6..f616c9516 100644--- a/kornia/models/yunet/model.py+++ b/kornia/models/yunet/model.py@@ -15,7 +15,7 @@# limitations under the License.#-# based on: https://github.com/ShiqiYu/libfacedetection.train/blob/74f3aa77c63234dd954d21286e9a60703b8d0868/tasks/task1/yufacedetectnet.py # noqa+# based on: https://github.com/ShiqiYu/libfacedetection.train/blob/74f3aa77c63234dd954d21286e9a60703b8d0868/tasks/task1/yufacedetectnet.py # noqa: E501from typing import Dict, List, Unionimport torchdiff --git a/pyproject.toml b/pyproject.tomlindex f24400b79..a2f8772e0 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -210,6 +210,7 @@ select = ["ICN", # flake8-import-conventions"INT", # flake8-gettext"NPY", # NumPy-specific rules+ "PGH004", # blanket-noqa"PIE", # flake8-pie"PL", # Pylint"PT001", # flake8-pytest-style: fixture parentheses