π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
[pre-commit.ci] pre-commit suggestions (#2360)
pre-commit-ci[bot]0713dfac1c37
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex 656e70fc7..db962ad28 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -15,12 +15,12 @@ repos:exclude: ^$|.devcontainer- repo: https://github.com/tox-dev/pyproject-fmt- rev: "0.10.0"+ rev: "0.11.1"hooks:- id: pyproject-fmt- repo: https://github.com/charliermarsh/ruff-pre-commit- rev: v0.0.259+ rev: v0.0.263hooks:- id: ruffargs: [--fix, --exit-non-zero-on-fix]@@ -41,7 +41,7 @@ repos:- "*.bib,*.ipynb"- repo: https://github.com/PyCQA/docformatter- rev: v1.6.3+ rev: v1.6.4hooks:- id: docformatterargs: [--in-place, --wrap-summaries=115, --wrap-descriptions=120]diff --git a/kornia/feature/adalam/utils.py b/kornia/feature/adalam/utils.pyindex bb1bbd40a..3322e79ba 100644--- a/kornia/feature/adalam/utils.py+++ b/kornia/feature/adalam/utils.py@@ -6,7 +6,7 @@ from kornia.core import Tensordef arange_sequence(ranges: Tensor) -> Tensor:- """returns a sequence of the ranges specified by the argument.+ """Returns a sequence of the ranges specified by the argument.Example:[2, 5, 1, 2] -> [0, 1, 0, 1, 2, 3, 4, 0, 0, 1]diff --git a/kornia/filters/kernels.py b/kornia/filters/kernels.pyindex 1191b9d41..529e5cb41 100644--- a/kornia/filters/kernels.py+++ b/kornia/filters/kernels.py@@ -149,7 +149,7 @@ def _modified_bessel_0(x: Tensor) -> Tensor:def _modified_bessel_1(x: Tensor) -> Tensor:- r"""adapted from:+ r"""Adapted from:https://github.com/Project-MONAI/MONAI/blob/master/monai/networks/layers/convutils.py"""@@ -175,7 +175,7 @@ def _modified_bessel_1(x: Tensor) -> Tensor:def _modified_bessel_i(n: int, x: Tensor) -> Tensor:- r"""adapted from:+ r"""Adapted from:https://github.com/Project-MONAI/MONAI/blob/master/monai/networks/layers/convutils.py"""diff --git a/kornia/geometry/bbox.py b/kornia/geometry/bbox.pyindex c1a587ef4..caf9ae370 100644--- a/kornia/geometry/bbox.py+++ b/kornia/geometry/bbox.py@@ -36,14 +36,14 @@ def validate_bbox(boxes: torch.Tensor) -> bool:if not torch.allclose((boxes[:, 1, 0] - boxes[:, 0, 0] + 1), (boxes[:, 2, 0] - boxes[:, 3, 0] + 1), atol=1e-4):raise ValueError(- "Boxes must have be rectangular, while get widths %s and %s"- % (str(boxes[:, 1, 0] - boxes[:, 0, 0] + 1), str(boxes[:, 2, 0] - boxes[:, 3, 0] + 1))+ f"Boxes must have be rectangular, while get widths {str(boxes[:, 1, 0] - boxes[:, 0, 0] + 1)}"+ f" and {str(boxes[:, 2, 0] - boxes[:, 3, 0] + 1)}")if not torch.allclose((boxes[:, 2, 1] - boxes[:, 0, 1] + 1), (boxes[:, 3, 1] - boxes[:, 1, 1] + 1), atol=1e-4):raise ValueError(- "Boxes must have be rectangular, while get heights %s and %s"- % (str(boxes[:, 2, 1] - boxes[:, 0, 1] + 1), str(boxes[:, 3, 1] - boxes[:, 1, 1] + 1))+ f"Boxes must be rectangular, while getting heights {str(boxes[:, 2, 1] - boxes[:, 0, 1] + 1)}"+ f" and {str(boxes[:, 3, 1] - boxes[:, 1, 1] + 1)}")return Truediff --git a/pyproject.toml b/pyproject.tomlindex 58c63d487..d47c42d4a 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -20,8 +20,12 @@ classifiers = ["License :: OSI Approved :: Apache Software License","Natural Language :: English","Operating System :: OS Independent",- "Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only",+ "Programming Language :: Python :: 3.7",+ "Programming Language :: Python :: 3.8",+ "Programming Language :: Python :: 3.9",+ "Programming Language :: Python :: 3.10",+ "Programming Language :: Python :: 3.11","Topic :: Scientific/Engineering :: Artificial Intelligence","Topic :: Scientific/Engineering :: Image Processing","Topic :: Software Development :: Libraries",