Skip to content

Commit d2761a3

Browse files
authored
pre-commit ruff 0.8.0 update (#7595)
1 parent 5fe059f commit d2761a3

32 files changed

+222
-222
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ repos:
4848
- --exclude=binder/
4949
- --exclude=versioneer.py
5050
- repo: https://github.com/astral-sh/ruff-pre-commit
51-
rev: v0.7.4
51+
rev: v0.8.0
5252
hooks:
5353
- id: ruff
5454
args: [--fix, --show-fixes]

pymc/backends/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
RunType = type(None) # type: ignore[assignment, misc]
9090

9191

92-
__all__ = ["to_inference_data", "predictions_to_inference_data"]
92+
__all__ = ["predictions_to_inference_data", "to_inference_data"]
9393

9494

9595
def _init_trace(

pymc/data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
from pymc.vartypes import isgenerator
4343

4444
__all__ = [
45-
"get_data",
45+
"ConstantData",
46+
"Data",
4647
"GeneratorAdapter",
4748
"Minibatch",
48-
"Data",
49-
"ConstantData",
5049
"MutableData",
50+
"get_data",
5151
]
5252
BASE_URL = "https://raw.githubusercontent.com/pymc-devs/pymc-examples/main/examples/data/{filename}"
5353

pymc/distributions/__init__.py

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -116,93 +116,93 @@
116116
from pymc.distributions.truncated import Truncated
117117

118118
__all__ = [
119-
"Uniform",
120-
"Flat",
121-
"HalfFlat",
122-
"Normal",
123-
"TruncatedNormal",
119+
"AR",
120+
"CAR",
121+
"GARCH11",
122+
"ICAR",
123+
"AsymmetricLaplace",
124+
"Bernoulli",
124125
"Beta",
125-
"Kumaraswamy",
126-
"Exponential",
127-
"Laplace",
128-
"StudentT",
126+
"BetaBinomial",
127+
"Binomial",
128+
"Categorical",
129129
"Cauchy",
130-
"HalfCauchy",
131-
"Gamma",
132-
"Weibull",
133-
"LogNormal",
134-
"Lognormal",
135-
"HalfStudentT",
130+
"Censored",
136131
"ChiSquared",
137-
"HalfNormal",
138-
"Wald",
139-
"Pareto",
140-
"InverseGamma",
141-
"ExGaussian",
142-
"VonMises",
143-
"Binomial",
144-
"BetaBinomial",
145-
"Bernoulli",
146-
"Poisson",
147-
"NegativeBinomial",
132+
"Continuous",
133+
"CustomDist",
134+
"DensityDist",
148135
"DiracDelta",
149-
"ZeroInflatedPoisson",
150-
"ZeroInflatedNegativeBinomial",
151-
"ZeroInflatedBinomial",
136+
"Dirichlet",
137+
"DirichletMultinomial",
138+
"Discrete",
152139
"DiscreteUniform",
140+
"DiscreteWeibull",
141+
"Distribution",
142+
"EulerMaruyama",
143+
"ExGaussian",
144+
"Exponential",
145+
"Flat",
146+
"Gamma",
147+
"GaussianRandomWalk",
153148
"Geometric",
149+
"Gumbel",
150+
"HalfCauchy",
151+
"HalfFlat",
152+
"HalfNormal",
153+
"HalfStudentT",
154+
"HurdleGamma",
155+
"HurdleLogNormal",
156+
"HurdleNegativeBinomial",
157+
"HurdlePoisson",
154158
"HyperGeometric",
155-
"Categorical",
156-
"OrderedLogistic",
157-
"OrderedProbit",
158-
"DensityDist",
159-
"CustomDist",
160-
"Distribution",
161-
"SymbolicRandomVariable",
162-
"Continuous",
163-
"Discrete",
164-
"MvNormal",
165-
"ZeroSumNormal",
166-
"MatrixNormal",
159+
"Interpolated",
160+
"InverseGamma",
167161
"KroneckerNormal",
168-
"MvStudentT",
169-
"Dirichlet",
170-
"StickBreakingWeights",
171-
"Multinomial",
172-
"DirichletMultinomial",
173-
"OrderedMultinomial",
174-
"Wishart",
175-
"WishartBartlett",
162+
"Kumaraswamy",
176163
"LKJCholeskyCov",
177164
"LKJCorr",
178-
"AsymmetricLaplace",
179-
"RandomWalk",
180-
"GaussianRandomWalk",
165+
"Laplace",
166+
"LogNormal",
167+
"Logistic",
168+
"LogitNormal",
169+
"Lognormal",
170+
"MatrixNormal",
171+
"Mixture",
172+
"Moyal",
173+
"Multinomial",
181174
"MvGaussianRandomWalk",
175+
"MvNormal",
176+
"MvStudentT",
182177
"MvStudentTRandomWalk",
183-
"AR",
184-
"EulerMaruyama",
185-
"GARCH11",
186-
"SkewNormal",
187-
"Mixture",
178+
"NegativeBinomial",
179+
"Normal",
188180
"NormalMixture",
189-
"Triangular",
190-
"DiscreteWeibull",
191-
"Gumbel",
192-
"Logistic",
193-
"LogitNormal",
194-
"Interpolated",
181+
"OrderedLogistic",
182+
"OrderedMultinomial",
183+
"OrderedProbit",
184+
"Pareto",
185+
"Poisson",
186+
"PolyaGamma",
187+
"RandomWalk",
195188
"Rice",
196-
"Moyal",
197189
"Simulator",
198-
"Truncated",
199-
"Censored",
200-
"CAR",
201-
"ICAR",
202-
"PolyaGamma",
203-
"HurdleGamma",
204-
"HurdleLogNormal",
205-
"HurdleNegativeBinomial",
206-
"HurdlePoisson",
190+
"SkewNormal",
207191
"SkewStudentT",
192+
"StickBreakingWeights",
193+
"StudentT",
194+
"SymbolicRandomVariable",
195+
"Triangular",
196+
"Truncated",
197+
"TruncatedNormal",
198+
"Uniform",
199+
"VonMises",
200+
"Wald",
201+
"Weibull",
202+
"Wishart",
203+
"WishartBartlett",
204+
"ZeroInflatedBinomial",
205+
"ZeroInflatedNegativeBinomial",
206+
"ZeroInflatedPoisson",
207+
"ZeroSumNormal",
208208
]

pymc/distributions/continuous.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -95,40 +95,40 @@ def polyagamma_cdf(*args, **kwargs):
9595
from pymc.math import invlogit, logdiffexp, logit
9696

9797
__all__ = [
98-
"Uniform",
99-
"Flat",
100-
"HalfFlat",
101-
"Normal",
102-
"TruncatedNormal",
98+
"AsymmetricLaplace",
10399
"Beta",
104-
"Kumaraswamy",
105-
"Exponential",
106-
"Laplace",
107-
"StudentT",
108100
"Cauchy",
109-
"HalfCauchy",
110-
"Gamma",
111-
"Weibull",
112-
"HalfStudentT",
113-
"LogNormal",
114101
"ChiSquared",
115-
"HalfNormal",
116-
"Wald",
117-
"Pareto",
118-
"InverseGamma",
119102
"ExGaussian",
120-
"VonMises",
121-
"SkewNormal",
122-
"Triangular",
103+
"Exponential",
104+
"Flat",
105+
"Gamma",
123106
"Gumbel",
107+
"HalfCauchy",
108+
"HalfFlat",
109+
"HalfNormal",
110+
"HalfStudentT",
111+
"Interpolated",
112+
"InverseGamma",
113+
"Kumaraswamy",
114+
"Laplace",
115+
"LogNormal",
124116
"Logistic",
125117
"LogitNormal",
126-
"Interpolated",
127-
"Rice",
128118
"Moyal",
129-
"AsymmetricLaplace",
119+
"Normal",
120+
"Pareto",
130121
"PolyaGamma",
122+
"Rice",
123+
"SkewNormal",
131124
"SkewStudentT",
125+
"StudentT",
126+
"Triangular",
127+
"TruncatedNormal",
128+
"Uniform",
129+
"VonMises",
130+
"Wald",
131+
"Weibull",
132132
]
133133

134134

pymc/distributions/discrete.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@
5252
from pymc.math import sigmoid
5353

5454
__all__ = [
55-
"Binomial",
56-
"BetaBinomial",
5755
"Bernoulli",
58-
"DiscreteWeibull",
59-
"Poisson",
60-
"NegativeBinomial",
56+
"BetaBinomial",
57+
"Binomial",
58+
"Categorical",
6159
"DiscreteUniform",
60+
"DiscreteWeibull",
6261
"Geometric",
6362
"HyperGeometric",
64-
"Categorical",
63+
"NegativeBinomial",
6564
"OrderedLogistic",
6665
"OrderedProbit",
66+
"Poisson",
6767
]
6868

6969
from pymc.pytensorf import normalize_rng_param

pymc/distributions/distribution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
from pymc.vartypes import continuous_types, string_types
6565

6666
__all__ = [
67-
"DiracDelta",
68-
"Distribution",
6967
"Continuous",
68+
"DiracDelta",
7069
"Discrete",
70+
"Distribution",
7171
"SymbolicRandomVariable",
7272
]
7373

pymc/distributions/multivariate.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,22 @@
8383
from pymc.util import check_dist_not_registered
8484

8585
__all__ = [
86-
"MvNormal",
87-
"ZeroSumNormal",
88-
"MvStudentT",
86+
"CAR",
87+
"ICAR",
8988
"Dirichlet",
90-
"Multinomial",
9189
"DirichletMultinomial",
92-
"OrderedMultinomial",
93-
"Wishart",
94-
"WishartBartlett",
95-
"LKJCorr",
90+
"KroneckerNormal",
9691
"LKJCholeskyCov",
92+
"LKJCorr",
9793
"MatrixNormal",
98-
"KroneckerNormal",
99-
"CAR",
100-
"ICAR",
94+
"Multinomial",
95+
"MvNormal",
96+
"MvStudentT",
97+
"OrderedMultinomial",
10198
"StickBreakingWeights",
99+
"Wishart",
100+
"WishartBartlett",
101+
"ZeroSumNormal",
102102
]
103103

104104
solve_lower = partial(solve_triangular, lower=True)

pymc/distributions/shape_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
from pymc.pytensorf import convert_observed_data
3737

3838
__all__ = [
39-
"to_tuple",
40-
"rv_size_is_none",
4139
"change_dist_size",
40+
"rv_size_is_none",
41+
"to_tuple",
4242
]
4343

4444
from pymc.exceptions import ShapeError

pymc/distributions/timeseries.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@
4949
from pymc.util import check_dist_not_registered
5050

5151
__all__ = [
52-
"RandomWalk",
53-
"GaussianRandomWalk",
54-
"MvGaussianRandomWalk",
55-
"MvStudentTRandomWalk",
5652
"AR",
5753
"GARCH11",
5854
"EulerMaruyama",
55+
"GaussianRandomWalk",
56+
"MvGaussianRandomWalk",
57+
"MvStudentTRandomWalk",
58+
"RandomWalk",
5959
]
6060

6161

pymc/distributions/transforms.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@
3636
)
3737

3838
__all__ = [
39-
"Transform",
40-
"simplex",
41-
"logodds",
39+
"Chain",
40+
"CholeskyCovPacked",
4241
"Interval",
42+
"Transform",
43+
"ZeroSumTransform",
44+
"circular",
45+
"log",
4346
"log_exp_m1",
47+
"logodds",
4448
"ordered",
45-
"log",
49+
"simplex",
4650
"sum_to_1",
47-
"circular",
48-
"CholeskyCovPacked",
49-
"Chain",
50-
"ZeroSumTransform",
5151
]
5252

5353

0 commit comments

Comments
 (0)