Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

[pre-commit.ci] pre-commit suggestions (#2266)

pre-commit-ci[bot]7b809ef1dc12
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 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.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
- rev: v2.2.2
+ rev: v2.2.4
hooks:
- id: codespell
args:
- --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.5
hooks:
- id: bandit
name: bandit excluding the test directory
diff --git a/docs/generate_example_images.py b/docs/generate_example_images.py
index ddb9b95c5..af4d75e24 100644
--- a/docs/generate_example_images.py
+++ b/docs/generate_example_images.py
@@ -20,7 +20,7 @@ from kornia.core import Tensor
def 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 ints
nparr = np.frombuffer(response, np.uint8)
# convert to image array and resize
diff --git a/kornia/utils/helpers.py b/kornia/utils/helpers.py
index 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: