Skip to content

Commit 6a4cdd6

Browse files
Create class after setting the class dictionary
1 parent 1031722 commit 6a4cdd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymc3/distributions/distribution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ class _Unpickling:
6565
class DistributionMeta(ABCMeta):
6666
def __new__(cls, name, bases, clsdict):
6767

68-
new_cls = super().__new__(cls, name, bases, clsdict)
69-
7068
# Forcefully deprecate old v3 `Distribution`s
7169
if "random" in clsdict:
7270

@@ -94,6 +92,8 @@ def _random(*args, **kwargs):
9492

9593
rv_type = type(rv_op)
9694

95+
new_cls = super().__new__(cls, name, bases, clsdict)
96+
9797
if rv_type is not None:
9898
# Create dispatch functions
9999

0 commit comments

Comments
 (0)