Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

downgrade docformatter to 1.5.1 (#2176)

Edgar Riba011078ef96e4
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 93afdfd2c..933e6e790 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -66,7 +66,7 @@ repos:
- "B101,B311"
- repo: https://github.com/PyCQA/docformatter
- rev: v1.6.0.rc1
+ rev: v1.5.1
hooks:
- id: docformatter
args: [--in-place, --wrap-summaries=115, --wrap-descriptions=120]
diff --git a/kornia/augmentation/container/ops.py b/kornia/augmentation/container/ops.py
index b8e2f2353..9ea346915 100644
--- a/kornia/augmentation/container/ops.py
+++ b/kornia/augmentation/container/ops.py
@@ -130,6 +130,7 @@ class AugmentationSequentialOps:
def make_input_only_sequential(module: 'kornia.augmentation.ImageSequential') -> Callable[..., Tensor]:
"""Disable all other additional inputs (e.g. ) for ImageSequential."""
+
def f(*args, **kwargs):
out = module(*args, **kwargs)
return out
diff --git a/kornia/augmentation/utils/helpers.py b/kornia/augmentation/utils/helpers.py
index b7f166116..082543758 100644
--- a/kornia/augmentation/utils/helpers.py
+++ b/kornia/augmentation/utils/helpers.py
@@ -19,6 +19,7 @@ def _validate_input(f: Callable[..., Any]) -> Callable[..., Any]:
Returns:
the wrapped function after input is validated.
"""
+
@wraps(f)
def wrapper(input: Tensor, *args, **kwargs):
if not torch.is_tensor(input):
@@ -41,6 +42,7 @@ def _validate_input3d(f: Callable[..., Any]) -> Callable[..., Any]:
Returns:
the wrapped function after input is validated.
"""
+
@wraps(f)
def wrapper(input: Tensor, *args, **kwargs):
if not torch.is_tensor(input):
diff --git a/kornia/feature/integrated.py b/kornia/feature/integrated.py
index 16ae5a13c..3ea67722e 100644
--- a/kornia/feature/integrated.py
+++ b/kornia/feature/integrated.py
@@ -150,8 +150,7 @@ class SIFTFeature(LocalFeature):
"""Convenience module, which implements DoG detector + (Root)SIFT descriptor.
Using `kornia.feature.MultiResolutionDetector` without blur pyramid Still not as good as OpenCV/VLFeat because of
- https://github.com/kornia/kornia/pull/884,
- but we are working on it
+ https://github.com/kornia/kornia/pull/884, but we are working on it
"""
def __init__(
diff --git a/kornia/feature/mkd.py b/kornia/feature/mkd.py
index 9f07e6dcd..8dd4626f2 100644
--- a/kornia/feature/mkd.py
+++ b/kornia/feature/mkd.py
@@ -473,6 +473,7 @@ class Whitening(nn.Module):
def _modify_lw(self) -> None:
"""No modification required."""
+
def _modify_pcaws(self) -> None:
"""Shrinkage for eigenvalues."""
alpha = self.evals[self.keval]
diff --git a/kornia/nerf/data_utils.py b/kornia/nerf/data_utils.py
index b7394301e..2d06a513b 100755
--- a/kornia/nerf/data_utils.py
+++ b/kornia/nerf/data_utils.py
@@ -161,6 +161,7 @@ def instantiate_ray_dataloader(dataset: RayDataset, batch_size: int = 1, shuffle
batch_size: Number of rays to sample in a batch: int
shuffle: Whether to shuffle rays or sample then sequentially: bool
"""
+
def collate_rays(items: List[RayGroup]) -> RayGroup:
return items[0]
diff --git a/kornia/utils/image.py b/kornia/utils/image.py
index b42864601..4cc989b15 100644
--- a/kornia/utils/image.py
+++ b/kornia/utils/image.py
@@ -215,6 +215,7 @@ def perform_keep_shape_image(f: Callable[..., Tensor]) -> Callable[..., Tensor]:
It works by first viewing the image as `(B, C, H, W)`, applying the function and re-viewing the image as original
shape.
"""
+
@wraps(f)
def _wrapper(input: Tensor, *args, **kwargs) -> Tensor:
if not isinstance(input, Tensor):
@@ -246,6 +247,7 @@ def perform_keep_shape_video(f: Callable[..., Tensor]) -> Callable[..., Tensor]:
It works by first viewing the image as `(B, C, D, H, W)`, applying the function and re-viewing the image as original
shape.
"""
+
@wraps(f)
def _wrapper(input: Tensor, *args, **kwargs) -> Tensor:
if not isinstance(input, Tensor):