π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
[pre-commit.ci] pre-commit suggestions (#2266)
pre-commit-ci[bot]7b809ef1dc12
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex b93eff751..c0c1f8844 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -20,17 +20,17 @@ repos:- id: pyproject-fmt- repo: https://github.com/psf/black- rev: 23.1.0+ rev: 23.3.0hooks:- id: black- repo: https://github.com/codespell-project/codespell- rev: v2.2.2+ rev: v2.2.4hooks:- id: codespellargs:- --ignore-words-list- - "ans,hist"+ - "ans,hist,laf"- --skip- "*.bib,*.ipynb"@@ -51,7 +51,7 @@ repos:args: [--py37-plus]- repo: https://github.com/PyCQA/bandit- rev: 1.7.4+ rev: 1.7.5hooks:- id: banditname: bandit excluding the test directorydiff --git a/docs/generate_example_images.py b/docs/generate_example_images.pyindex ddb9b95c5..af4d75e24 100644--- a/docs/generate_example_images.py+++ b/docs/generate_example_images.py@@ -20,7 +20,7 @@ from kornia.core import Tensordef read_img_from_url(url: str, resize_to: Optional[Tuple[int, int]] = None) -> torch.Tensor:# perform request- response = requests.get(url).content+ response = requests.get(url, timeout=60).content# convert to array of intsnparr = np.frombuffer(response, np.uint8)# convert to image array and resizediff --git a/kornia/utils/helpers.py b/kornia/utils/helpers.pyindex d51a181fa..45e5f7153 100644--- a/kornia/utils/helpers.py+++ b/kornia/utils/helpers.py@@ -275,7 +275,7 @@ def is_autocast_enabled(both: bool = True) -> bool:Returns:Return a Bool,will always return False for a torch without support, otherwise will be: if both is True- `torch.is_autocast_enabled() or torch.is_autocast_cpu_enabled()`. If both is Flase will return just+ `torch.is_autocast_enabled() or torch.is_autocast_cpu_enabled()`. If both is False will return just`torch.is_autocast_enabled()`."""if TYPE_CHECKING: