Skip to content

Commit 6c68836

Browse files
committed
⬆️ UPGRADE: Autoupdate pre-commit config
1 parent 6017dae commit 6c68836

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repos:
1919
- id: isort
2020
name: isort
2121
- repo: https://github.com/asottile/pyupgrade
22-
rev: v2.26.0
22+
rev: v2.28.0
2323
hooks:
2424
- id: pyupgrade
2525
args: [--py37-plus]

pymc/gp/mean.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Constant(Mean):
6060
"""
6161

6262
def __init__(self, c=0):
63-
Mean.__init__(self)
63+
super().__init__()
6464
self.c = c
6565

6666
def __call__(self, X):
@@ -80,7 +80,7 @@ class Linear(Mean):
8080
"""
8181

8282
def __init__(self, coeffs, intercept=0):
83-
Mean.__init__(self)
83+
super().__init__()
8484
self.b = intercept
8585
self.A = coeffs
8686

@@ -90,7 +90,7 @@ def __call__(self, X):
9090

9191
class Add(Mean):
9292
def __init__(self, first_mean, second_mean):
93-
Mean.__init__(self)
93+
super().__init__()
9494
self.m1 = first_mean
9595
self.m2 = second_mean
9696

@@ -100,7 +100,7 @@ def __call__(self, X):
100100

101101
class Prod(Mean):
102102
def __init__(self, first_mean, second_mean):
103-
Mean.__init__(self)
103+
super().__init__()
104104
self.m1 = first_mean
105105
self.m2 = second_mean
106106

pymc/tests/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, matcher):
5454
# shouldFlush anyway, we can set a capacity of zero.
5555
# You can call flush() manually to clear out the
5656
# buffer.
57-
BufferingHandler.__init__(self, 0)
57+
super().__init__(0)
5858
self.matcher = matcher
5959

6060
def shouldFlush(self):

pymc/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ def __setitem__(self, key, value):
8989
# This is my best guess about what this should do. I might be happier
9090
# to kill both of these if they are not used.
9191
def __mul__(self, other) -> "treelist":
92-
return cast("treelist", list.__mul__(self, other))
92+
return cast("treelist", super().__mul__(other))
9393

9494
def __imul__(self, other) -> "treelist":
9595
t0 = len(self)
96-
list.__imul__(self, other)
96+
super().__imul__(other)
9797
if self.parent is not None:
9898
self.parent.extend(self[t0:])
9999
return self # python spec says should return the result.

pymc/variational/operators.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class KL(Operator):
4949
"""
5050

5151
def __init__(self, approx, beta=1.0):
52-
Operator.__init__(self, approx)
52+
super().__init__(approx)
5353
self.beta = pm.floatX(beta)
5454

5555
def apply(self, f):
@@ -73,7 +73,7 @@ class KSDObjective(ObjectiveFunction):
7373
def __init__(self, op, tf):
7474
if not isinstance(op, KSD):
7575
raise opvi.ParametrizationError("Op should be KSD")
76-
ObjectiveFunction.__init__(self, op, tf)
76+
super().__init__(op, tf)
7777

7878
@aesara.config.change_flags(compute_test_value="off")
7979
def __call__(self, nmc, **kwargs):
@@ -127,7 +127,7 @@ class KSD(Operator):
127127
objective_class = KSDObjective
128128

129129
def __init__(self, approx, temperature=1):
130-
Operator.__init__(self, approx)
130+
super().__init__(approx)
131131
self.temperature = temperature
132132

133133
def apply(self, f):

0 commit comments

Comments
 (0)