Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

Use literal syntax instead of function calls to create data structure (#1087)

deepsource-autofix[bot]4633d08b814b
diff --git a/kornia/feature/affine_shape.py b/kornia/feature/affine_shape.py
index da1e1bf7e..a5dc696b9 100644
--- a/kornia/feature/affine_shape.py
+++ b/kornia/feature/affine_shape.py
@@ -8,7 +8,7 @@ from kornia.filters import SpatialGradient
from kornia.feature.laf import ellipse_to_laf, get_laf_scale, raise_error_if_laf_is_not_valid, scale_laf, make_upright
from kornia.feature import extract_patches_from_pyramid
-urls: Dict[str, str] = dict()
+urls: Dict[str, str] = {}
urls["affnet"] = "https://github.com/ducha-aiki/affnet/raw/master/pretrained/AffNet.pth"
diff --git a/kornia/feature/hardnet.py b/kornia/feature/hardnet.py
index cae8834f4..557779d5b 100644
--- a/kornia/feature/hardnet.py
+++ b/kornia/feature/hardnet.py
@@ -4,7 +4,7 @@ import torch
import torch.nn as nn
import torch.nn.functional as F
-urls: Dict[str, str] = dict()
+urls: Dict[str, str] = {}
urls["hardnet++"] = "https://github.com/DagnyT/hardnet/raw/master/pretrained/pretrained_all_datasets/HardNet++.pth"
urls[
"liberty_aug"
diff --git a/kornia/feature/orientation.py b/kornia/feature/orientation.py
index e44b451e0..54db020a5 100644
--- a/kornia/feature/orientation.py
+++ b/kornia/feature/orientation.py
@@ -17,7 +17,7 @@ from kornia.feature import (
)
from kornia.geometry import rad2deg
-urls: Dict[str, str] = dict()
+urls: Dict[str, str] = {}
urls["orinet"] = "https://github.com/ducha-aiki/affnet/raw/master/pretrained/OriNet.pth"
diff --git a/kornia/feature/sosnet.py b/kornia/feature/sosnet.py
index 479f6c09f..6430c8aeb 100644
--- a/kornia/feature/sosnet.py
+++ b/kornia/feature/sosnet.py
@@ -3,7 +3,7 @@ from typing import Dict
import torch
import torch.nn as nn
-urls: Dict[str, str] = dict()
+urls: Dict[str, str] = {}
urls["lib"] = "https://github.com/yuruntian/SOSNet/raw/master/sosnet-weights/sosnet_32x32_liberty.pth"
urls["hp_a"] = "https://github.com/yuruntian/SOSNet/raw/master/sosnet-weights/sosnet_32x32_hpatches_a.pth"
diff --git a/kornia/feature/tfeat.py b/kornia/feature/tfeat.py
index d6ee8bfb2..8a2023660 100644
--- a/kornia/feature/tfeat.py
+++ b/kornia/feature/tfeat.py
@@ -4,7 +4,7 @@ import torch
import torch.nn as nn
import torch.nn.functional as F
-urls: Dict[str, str] = dict()
+urls: Dict[str, str] = {}
urls[
"liberty"
] = "https://github.com/vbalnt/tfeat/raw/master/pretrained-models/tfeat-liberty.params" # noqa pylint: disable