We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6017dae commit 6c68836Copy full SHA for 6c68836
.pre-commit-config.yaml
@@ -19,7 +19,7 @@ repos:
19
- id: isort
20
name: isort
21
- repo: https://github.com/asottile/pyupgrade
22
- rev: v2.26.0
+ rev: v2.28.0
23
hooks:
24
- id: pyupgrade
25
args: [--py37-plus]
pymc/gp/mean.py
@@ -60,7 +60,7 @@ class Constant(Mean):
60
"""
61
62
def __init__(self, c=0):
63
- Mean.__init__(self)
+ super().__init__()
64
self.c = c
65
66
def __call__(self, X):
@@ -80,7 +80,7 @@ class Linear(Mean):
80
81
82
def __init__(self, coeffs, intercept=0):
83
84
self.b = intercept
85
self.A = coeffs
86
@@ -90,7 +90,7 @@ def __call__(self, X):
90
91
class Add(Mean):
92
def __init__(self, first_mean, second_mean):
93
94
self.m1 = first_mean
95
self.m2 = second_mean
96
@@ -100,7 +100,7 @@ def __call__(self, X):
100
101
class Prod(Mean):
102
103
104
105
106
pymc/tests/helpers.py
@@ -54,7 +54,7 @@ def __init__(self, matcher):
54
# shouldFlush anyway, we can set a capacity of zero.
55
# You can call flush() manually to clear out the
56
# buffer.
57
- BufferingHandler.__init__(self, 0)
+ super().__init__(0)
58
self.matcher = matcher
59
def shouldFlush(self):
pymc/util.py
@@ -89,11 +89,11 @@ def __setitem__(self, key, value):
89
# This is my best guess about what this should do. I might be happier
# to kill both of these if they are not used.
def __mul__(self, other) -> "treelist":
- return cast("treelist", list.__mul__(self, other))
+ return cast("treelist", super().__mul__(other))
def __imul__(self, other) -> "treelist":
t0 = len(self)
- list.__imul__(self, other)
+ super().__imul__(other)
97
if self.parent is not None:
98
self.parent.extend(self[t0:])
99
return self # python spec says should return the result.
pymc/variational/operators.py
@@ -49,7 +49,7 @@ class KL(Operator):
49
50
51
def __init__(self, approx, beta=1.0):
52
- Operator.__init__(self, approx)
+ super().__init__(approx)
53
self.beta = pm.floatX(beta)
def apply(self, f):
@@ -73,7 +73,7 @@ class KSDObjective(ObjectiveFunction):
73
def __init__(self, op, tf):
74
if not isinstance(op, KSD):
75
raise opvi.ParametrizationError("Op should be KSD")
76
- ObjectiveFunction.__init__(self, op, tf)
+ super().__init__(op, tf)
77
78
@aesara.config.change_flags(compute_test_value="off")
79
def __call__(self, nmc, **kwargs):
@@ -127,7 +127,7 @@ class KSD(Operator):
127
objective_class = KSDObjective
128
129
def __init__(self, approx, temperature=1):
130
131
self.temperature = temperature
132
133
0 commit comments