chore(pre-commit): Update plugin versions and rerun all files

This commit is contained in:
Alexander Engelsberger 2021-10-13 10:54:53 +02:00
parent a8829945f5
commit d4448f2bc9
No known key found for this signature in database
GPG Key ID: BE3F5909FF0D83E3
4 changed files with 7 additions and 6 deletions

View File

@ -18,12 +18,12 @@ repos:
- id: autoflake
- repo: http://github.com/PyCQA/isort
rev: 5.8.0
rev: 5.9.3
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.902
rev: v0.910-1
hooks:
- id: mypy
files: prototorch
@ -42,9 +42,10 @@ repos:
- id: python-check-blanket-noqa
- repo: https://github.com/asottile/pyupgrade
rev: v2.19.4
rev: v2.29.0
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/si-cim/gitlint
rev: v0.15.2-unofficial

View File

@ -131,7 +131,7 @@ class SiameseGLVQ(GLVQ):
def compute_distances(self, x):
protos, _ = self.proto_layer()
x, protos = [arr.view(arr.size(0), -1) for arr in (x, protos)]
x, protos = (arr.view(arr.size(0), -1) for arr in (x, protos))
latent_x = self.backbone(x)
self.backbone.requires_grad_(self.both_path_gradients)
latent_protos = self.backbone(protos)

View File

@ -1,4 +1,4 @@
class ProtoTorchMixin(object):
class ProtoTorchMixin:
"""All mixins are ProtoTorchMixins."""
pass

View File

@ -18,7 +18,7 @@ PLUGIN_NAME = "models"
PROJECT_URL = "https://github.com/si-cim/prototorch_models"
DOWNLOAD_URL = "https://github.com/si-cim/prototorch_models.git"
with open("README.md", "r") as fh:
with open("README.md") as fh:
long_description = fh.read()
INSTALL_REQUIRES = [